Skip to content

expires_in token is sometimes a string in JSON response #3

Description

@nadeemabdulhamid

I suggest modifying this line:

[new-expires-in (hash-ref json 'expires_in +inf.0)])

to:

         [new-expires-in/raw (hash-ref json 'expires_in +inf.0)]
         [new-expires-in (if (string? new-expires-in/raw)
                             (string->number new-expires-in/raw)
                             new-expires-in/raw)]

I was using this library with Microsoft OAUTH authentication and it looks like the expires_in field in the json response is being given back as a string by the server, so this tweak would apply string->number if a server does that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions