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

problem with IOS Facebook federated identify when user cancel instead of confirm the signout #4910

Closed
4 tasks done
ericowhadi opened this issue Jan 13, 2024 · 1 comment · Fixed by #4942
Closed
4 tasks done
Assignees
Labels
Authenticator An issue or a feature-request for an Authenticator UI Component bug Something isn't working React Native An issue or a feature-request for React Native platform

Comments

@ericowhadi
Copy link

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React Native

Which UI component?

Authenticator

How is your app built?

react-native start

What browsers are you seeing the problem on?

iOS (React Native)

Which region are you seeing the problem in?

No response

Please describe your bug.

when login using facebook federated identity to login, then click on signout button, on IOS, get prompted with something like:
"myapp" wants to use "amazoncognito" to sign in (note the confusing message because I am signin out, not signin in).
Now if I hit cancel instead of Continue, the Authenticator is in bogus state:
The ui will display the login page, but if you click on Sign In With Facebook, you will get a "Possible unhandled promise rejection. UserAlreadyAuthenticatedException: There is already a signed in user.
The only way I found to get out of that state is to restart the IOS simulator, then signoff and now correctly hit continue instead of cancel when prompted with the message.

What's the expected behaviour?

ideally, the code should detect this situation and force logout

Help us reproduce the bug!

when login using facebook federated identity to login, then click on signout button, on IOS, get prompted with something like:
"myapp" wants to use "amazoncognito" to sign in (note the confusing message because I am signin out, not signin in).
Now if I hit cancel instead of Continue, the Authenticator is in bogus state:
The ui will display the login page, but if you click on Sign In With Facebook, you will get a "Possible unhandled promise rejection. UserAlreadyAuthenticatedException: There is already a signed in user.
The only way I found to get out of that state is to restart the IOS simulator, then signoff and now correctly hit continue instead of cancel when prompted with the message.

Code Snippet

// Put your code below this line.

Console log output

No response

Additional information and screenshots

No response

@github-actions github-actions bot added the pending-triage Issue is pending triage label Jan 13, 2024
@thaddmt thaddmt added bug Something isn't working React Native An issue or a feature-request for React Native platform Authenticator An issue or a feature-request for an Authenticator UI Component and removed pending-triage Issue is pending triage labels Jan 22, 2024
@calebpollman
Copy link
Member

@ericowhadi Was able to reproduce the sign out behavior on our end when using the signOut function returned from useAuthenticator. Until a fix is available, a workaround is available by importing signOut directly from aws-amplify/auth:

import { signOut } from 'aws-amplify/auth';'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authenticator An issue or a feature-request for an Authenticator UI Component bug Something isn't working React Native An issue or a feature-request for React Native platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants