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

[Authenticator] Sign-in fails after refresh token has expired #189

Closed
2 tasks done
pmellaaho opened this issue Sep 16, 2024 · 4 comments
Closed
2 tasks done

[Authenticator] Sign-in fails after refresh token has expired #189

pmellaaho opened this issue Sep 16, 2024 · 4 comments
Assignees
Labels
authenticator This issue relates to the Authenticator component bug Something isn't working

Comments

@pmellaaho
Copy link

Before creating a new issue, please confirm:

Which UI component?

Authenticator

Gradle script dependencies

// Put output below this line
authenticatorVersion = "1.2.3"

Environment information

# Put output below this line
Gradle 8.7

Please include any relevant guides or documentation you're referencing

#145

Describe the bug

So, the fix for this problem should have been released with Authenticator v.1.2.3
#145

I tested this but unfortunately the sign-in is still not possible, here is the logs from Authenticator:

Moving to initial step: com.amplifyframework.ui.authenticator.enums.AuthenticatorStep$SignIn@42a7884
Moving to step: com.amplifyframework.ui.authenticator.enums.AuthenticatorStep$SignIn@42a7884
Encountered AuthException: SignedInException{message=There is already a user signed in., cause=null, recoverySuggestion=Sign out the user first before signing in again.}
Sending message: com.amplifyframework.ui.authenticator.util.UnknownErrorMessage@a46ea43

I suppose, after some debugging, that the fix was made to handleSignedIn() -method but maybe it also needs to be fixed in handleSignInFailure()?

Reproduction steps (if applicable)

In your cognito pool set your refresh token expiry to 60 minutes. This is under App Integration > client. (this is not necessary, but makes the issue much easier to reproduce)

  1. Sign in with a user
  2. Let the refresh token expire
  3. Launch the app again, sign in screen will re-appear
  4. Try to sign in again
  5. Expected: Sign in is successful

Actual: "Something went wrong"

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


amplifyconfiguration.json

No response

Additional information and screenshots

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Sep 16, 2024
@mattcreaser mattcreaser added bug Something isn't working authenticator This issue relates to the Authenticator component labels Sep 16, 2024
@github-actions github-actions bot removed the pending-triage Issue is pending triage label Sep 16, 2024
@mattcreaser
Copy link
Member

Agree this should have been resolved. We'll need to take a look at why it wasn't.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Sep 16, 2024
@edisooon edisooon self-assigned this Sep 16, 2024
@pmellaaho
Copy link
Author

I was really happy to find out that after updating to Authenticator 1.3.0, the sign-in started working in the above mentioned scenario. I really don't know why that is but that seems to be the case.

Copy link
Contributor

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@mattcreaser
Copy link
Member

Looked into this briefly and in Authenticator 1.2.3 the Amplify dependency was still on 2.18.0 - it should have been updated to a newer version in that release, but wasn't. The dependency was updated to Amplify 2.21.1 in Authenticator 1.3.0.

The actual fix was in Amplify 2.19.1, so this is why it wasn't resolved in Authenticator 1.2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authenticator This issue relates to the Authenticator component bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants