Skip to content
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

Fix auth_time validation #626

Merged
merged 1 commit into from
Jan 12, 2022
Merged

Fix auth_time validation #626

merged 1 commit into from
Jan 12, 2022

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Jan 12, 2022

Changes

This PR fixes the validation of the auth_time claim when performing ID Token validation.
The spec specifies:

Screen Shot 2022-01-12 at 11 43 30

So it should error when now > last auth time + max age + leeway. Currently, it was succeeding in that case.

References

Fixes #609
Closes #610

Android implementation: https://github.com/auth0/Auth0.Android/blob/cd9ba7460a4992aa804b940656d16977e743a347/auth0/src/main/java/com/auth0/android/provider/IdTokenVerifier.java#L96-L111

Testing

Besides adding unit tests, the changes were tested manually with an iPhone simulator running iOS 14.5, using Xcode 13.2.1 (13C100)

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@Widcket Widcket requested a review from a team as a code owner January 12, 2022 14:45
@Widcket Widcket added the review:small Small review label Jan 12, 2022
@Widcket Widcket merged commit acb6854 into beta Jan 12, 2022
@Widcket Widcket deleted the v2/fix-authtime branch January 12, 2022 15:05
@Widcket Widcket mentioned this pull request Feb 2, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants