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

Got NotAuthorizedEception when doing global signOut #2934

Open
preethambogadi opened this issue Oct 7, 2024 · 2 comments
Open

Got NotAuthorizedEception when doing global signOut #2934

preethambogadi opened this issue Oct 7, 2024 · 2 comments
Labels
auth Related to the Auth category/plugins question General question

Comments

@preethambogadi
Copy link

preethambogadi commented Oct 7, 2024

From our app we are calling the following code when doing a logOut operation.

val options = AuthSignOutOptions.builder()
.globalSignOut(isGlobalSignOut)
.build()
Amplify.Auth.signOut(options)
{.....}

But getting the exception as shown in screenshot for some users only.

Screenshot 2024-10-04 at 2 44 08 PM

Using the following dependencies

implementation 'com.amplifyframework:core:2.20.0'
implementation 'com.amplifyframework:aws-auth-cognito:2.20.0'
implementation 'com.amplifyframework:aws-api:2.20.0'
implementation 'com.amazonaws:aws-android-sdk-iot:2.75.2'
@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 Oct 7, 2024
@mattcreaser
Copy link
Member

Thanks for the report @preethambogadi. We will need to investigate the correct behaviour here and get back to you.

@mattcreaser mattcreaser added bug Something isn't working auth Related to the Auth category/plugins labels Oct 8, 2024
@github-actions github-actions bot removed pending-maintainer-response Issue is pending response from an Amplify team member pending-triage Issue is pending triage labels Oct 8, 2024
@tylerjroach
Copy link
Member

This looks like it may be expected behavior but I can't fully tell as the logs are cut off.

If the tokens are expired (access token + refresh) then the API calls for revoking token and global sign out will fail (the tokens are already expired).

What is important to realize is that this is just a partial failure. The end result state is still "logged out" with credentials cleared on the device. This is not a fatal exception. This is just a warning log.

@tylerjroach tylerjroach added question General question and removed bug Something isn't working labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Related to the Auth category/plugins question General question
Projects
None yet
Development

No branches or pull requests

3 participants