Closed Glognus closed 6 months ago
HI @Glognus thank you for opening this issue - as shown in the comment above this issue is related to an existing on, however the existing issue contains a work around that is available in previous major versions of aws-amplify
~that isn't available in v6. I'm working to determine a work around, however in the meantime, I'll mark this as a bug and will follow up soon~.
Hi @Glognus following up here - after discussing with the team, I want to correct the above comment and say that it is possible to suppress the pop up in v6 as well. The way to achieve it is to pass the preferPrivateSession
flag when calling signInWithRedirect()
api. However note that the application will not use any sessions from the user's browser, and it will suppress the pop up on both sign in and sign out.
await signInWithRedirect({
provider: 'Google',
options: {
preferPrivateSession: true
},
});
I'll go ahead and unmark this as a bug but let me know if you have any additional questions.
Thank you for your reply, it works better with preferPrivateSession: true
@nadetastic Do you plan to resolve this problem in the future without using preferPrivateSession?
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Amplify CLI
Environment information
Describe the bug
I am experiencing an unexpected behavior with the aws-amplify/auth package in my application. Specifically, when executing actions intended for user sign-out Wants to Use amazoncognito.com to Sign In". This behavior is misleading and inaccurate, as these operations should not trigger any sign-in related processes or notifications.
(Auth.signOut())
or user deletion(Auth.deleteUser())
, a popup unexpectedly appears on the user's screen. This popup wrongly states, "This popup suggests to the users that the application is attempting to initiate a sign-in process through Amazon Cognito, which is completely opposite to the user's action of signing out or deleting their account. Not only is this confusing for users, but it also disrupts the intended flow and user experience of the application. There should be no implication or suggestion of a sign-in process during the sign-out or account deletion actions.
Expected behavior
My expectation for the Auth.signOut() and Auth.deleteUser() operations within the aws-amplify/auth package is straightforward: these actions should cleanly sign out or delete the user's account without any misleading prompts or messages. Specifically, upon executing either of these actions, the user should not be confronted with any popups or messages suggesting an initiation of a sign-in process.
For the
Auth.signOut()
operation, the expected behavior is a silent sign-out process where the user is logged out of the application without any additional prompts or messages, seamlessly returning them to the sign-in page or landing page as defined by the application logic.For the
Auth.deleteUser()
operation, the expectation is that the user's account is deleted without misleading feedback, and the application should then navigate the user appropriately, either to a confirmation screen stating that their account has been successfully deleted or back to the initial app state that does not imply re-authentication is needed.In both cases, the key expectation is the absence of any sign-in related popups, especially ones falsely indicating that the application is trying to use Amazon Cognito for sign-in during these logout or account deletion processes. These actions should be handled internally by the application and the AWS Amplify framework without exposing users to incorrect or confusing messaging.
Reproduction steps
When user trigger signout() or deleteUser() :
Code Snippet
Mobile Device
iPhone 15 Pro
Mobile Operating System
IOS 17.2