-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(idtoken): add ParsePayload returning unvalidated token payload #2136
Conversation
…rification. Also make the error message for token expiration slightly more informative. Both of these changes are made in order to improve debugability in cases where verification fails.
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
Please open an issue for discussion before making changes detailing the how/why for the feature request. |
Created #2137 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some tests as well, thanks.
Thanks Noah for the comment improvements. I will also add unit tests shortly. |
Added unit tests |
…just function and some other minor fixes.
LGTM @codyoss please stamp and I will get this into the next release (hopefully today!) |
GetPayload
attempts to parse the token and return the parsed payload from therein. It does not attempt toValidate
the token semantically or otherwise. This is especially useful for the case whereValidate
fails and the user wants to inspect the payload directly (Validate
doesn't return the payload on failure currently).Also, improve the error message for token expiration by including the expiration time and the evaluated time.
Fixes #2137