Skip to content

Conversation

@edisooon
Copy link
Contributor

@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