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(authenticator): fix signed in state when access token is expired #170

Merged
merged 6 commits into from
Aug 16, 2024

Conversation

phantumcode
Copy link
Contributor

@phantumcode phantumcode commented Jul 19, 2024

Issue #, if available:
#145
Description of changes:
Update Authenthenticator to handle signed in state with expired access token. If getCurrentUser() fails when in a signed in state, sign out and move state to SignIn.

This is consistent with Amplify UI Swift Authenticator behavior: https://github.com/aws-amplify/amplify-ui-swift-authenticator/blob/6561a42866883bd446f33ddb447215d0357d0e43/Sources/Authenticator/Models/AuthenticatorState.swift#L99-L103

How did you test these changes?

  • Updated existing unit test
  • Verified with manual test by setting access token expiration to 60 minutes

Documentation update required?

  • No
  • Yes (Please include a PR link for the documentation update)

General Checklist

  • Added Unit Tests
  • Added Integration Tests
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Ensure commit message has the appropriate scope (e.g fix(liveness): message, fix(authenticator): message, fix(all): message)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@phantumcode phantumcode requested review from a team as code owners July 19, 2024 20:36
mattcreaser
mattcreaser previously approved these changes Jul 24, 2024
lawmicha
lawmicha previously approved these changes Jul 25, 2024
@phantumcode phantumcode dismissed stale reviews from lawmicha and mattcreaser via 52cfc92 July 30, 2024 15:01
@phantumcode phantumcode merged commit 77fbc8a into main Aug 16, 2024
1 check passed
@phantumcode phantumcode deleted the phantum/fix_expired_signin_state branch August 16, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants