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

chore(auth): refractor handleSignedIn method in AuthenticatorViewModel #192

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

edisooon
Copy link
Member

@edisooon edisooon commented Sep 23, 2024

Issue #, if available: https://github.com/aws-amplify/amplify-ui-android/issues/189

Description of changes:
instead of "manually" moveTo SignIn state after signing out, we could listen to HubEvents: AuthChannelEventName.SIGNED_OUT, which was implemented in start() method of AuthenticatorViewModel.kt.

How did you test these changes?
(Please add a line here how the changes were tested)
Instead of testing the resulting state (which should be SignIn), we just need to make sure that signOut() is being called when getCurrentUser errors with SessionExpiredException during start

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.

@edisooon edisooon requested review from a team as code owners September 23, 2024 21:25
@edisooon edisooon merged commit b733b22 into main Sep 25, 2024
1 check passed
@edisooon edisooon deleted the edisonzz/session-expired-exception-handle-refractor branch September 25, 2024 19:39
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.

3 participants