You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use this crate (version 2.5.0) against Auth0 and I'm running into some issues. It's possible that this is caused by me misusing the crate's API, but... the code I have so far is a direct copy/paste of the sample code in the documentation, so there may be an actual bug.
When I issue the exchange_code call to obtain an ID token right after I get a callback redirect, I get an error of type RequestTokenError::Parse. Here is the error message (first field of the Parse type):
Error { path: Path { segments: [] }, original: Error(\"Failed to parse payload JSON: Error(\\\"data did not match any variant of untagged enum Timestamp\\\", line: 1, column: 466)\", line: 1, column: 1626) }
And then this is the content (second field of the Parse type) I got back from the server (tokens redacted):
I suspect the problem is caused by the untyped expires_in field, but as far as I can tell, that's a valid reply from the server.
Note that I had to explicitly capture the Parse error and turn the raw byte output from the server into a string to print it out. (It'd be nice if the default Debug on Parse did this, as it was pretty annoying to decode the actual output I got from the server.)
Could you advice? Am I really misusing something, or does the code in the crate need some extra type annotations for proper deserialization?
Thank you!
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to use this crate (version 2.5.0) against Auth0 and I'm running into some issues. It's possible that this is caused by me misusing the crate's API, but... the code I have so far is a direct copy/paste of the sample code in the documentation, so there may be an actual bug.
When I issue the
exchange_code
call to obtain an ID token right after I get a callback redirect, I get an error of typeRequestTokenError::Parse
. Here is the error message (first field of theParse
type):And then this is the content (second field of the
Parse
type) I got back from the server (tokens redacted):I suspect the problem is caused by the untyped
expires_in
field, but as far as I can tell, that's a valid reply from the server.Note that I had to explicitly capture the
Parse
error and turn the raw byte output from the server into a string to print it out. (It'd be nice if the defaultDebug
onParse
did this, as it was pretty annoying to decode the actual output I got from the server.)Could you advice? Am I really misusing something, or does the code in the crate need some extra type annotations for proper deserialization?
Thank you!
The text was updated successfully, but these errors were encountered: