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
Auth.signInWithWebUI with AuthProvider.custom redirect URI issue #4864
Comments
Hi @alegos27, we will look into this issue and get back to you with any updates. |
Hi @alegos27, in the first two screenshots, are you using the |
Hi @khatruong2009, the first two screenshots show AuthProvider.custom, but used with Google as the SSO authenticator. We encounter the same issue with other providers like Azure. So, all three screenshots depict a single unsuccessful sign-in flow. |
@alegos27 thank you for providing these details. we will look into this issue and get back to you with any updates. |
@alegos27 in the amplify configuration I noticed that you are using |
@NikaHsn Yes, I can confirm that we are using a custom authentication flow with AWS Lambda triggers in the auth flow with email (Amplify.Auth.signIn). However, for the Amplify.Auth.signInWithWebUI function, we are not using the custom authentication flow. Instead, we use identity providers configured in Cognito as you can see in the screenshots above. |
@alegos27 thank you for providing these details. we will look into this and get back to you with any updates. |
same issue here, any updates? |
Hi @dagovalsusa, no updates yet. We still need to reproduce this. We will update when we have more information. |
Description
When using Amplify's signInWithWebUI(provider: AuthProvider.custom(provider)) function with a custom provider, the WebUI does not return to the application after a successful third-party login. Instead, it navigates to the Cognito authentication base URL and shows an error message: "Something went wrong. Please try again." Closing the WebView manually leaves no authenticated session in Amplify. This issue is unique to custom providers since the same flow with social logins, such as signInWithWebUI(provider: AuthProvider.google), works correctly using identical configurations.
Categories
Steps to Reproduce
1.) Amplify Configuration and Init
Use this configuration:
Init Amplify in main.dart:
2.) Call signInWithWebUI function:
Use the following function to initiate a sign-in with a third-party provider via Amplify's WebUI:
3.) Complete the Third-Party Authentication:
4.) Observe the Redirection:
5.) Close the WebView:
Screenshots
Platforms
Flutter Version
3.19.6
Amplify Flutter Version
2.0.0
Deployment Method
Custom Pipeline
Schema
No response
The text was updated successfully, but these errors were encountered: