Reputation: 33
I want to implement Google authentication with AWS Cognito identity providers. Authentication itself works but I want to change iOS permission alert that shows when trying to sign in with Google. It says: MyApp wants to use "amazoncognito.com" to sign in. Is it possible to change amazoncognito.com in the alert message to google.com? Because I think that amazoncognito.com might be confusing to the user.
I am using Amplify Flutter, and Google authentication is launched as mentioned in docs.
try {
var res = await Amplify.Auth.signInWithWebUI(provider: AuthProvider.google);
} on AmplifyException catch (e) {
print(e.message);
}
This code shows the permission dialog on iOS.
If it is not possible to do this, then what is an alternative to implement Google authentication with AWS in Flutter?
Upvotes: 3
Views: 407
Reputation: 82
USE .preferPrivateSession() TO HIDE THE ALERT POPUP
Prefer private session during signIn
Amplify.Auth.signInWithWebUI(presentationAnchor: self.view.window!,
options: .preferPrivateSession()) { ... }
Upvotes: 1