amazon-web-services - 自定义 AWS 身份提供商 iOS 权限消息

标签 amazon-web-services amazon-cognito aws-amplify

我想使用 AWS Cognito 身份提供商实现 Google 身份验证。身份验证本身有效,但我想更改尝试使用 Google 登录时显示的 iOS 权限警报。它说:MyApp 想要使用“amazoncognito.com”登录。是否可以将警报消息中的 amazoncognito.com 更改为 google.com?因为我认为 amazoncognito.com 可能会让用户感到困惑。

我正在使用 Amplify Flutter,并启动了 Google 身份验证,如 docs 中所述.

try {
    var res = await Amplify.Auth.signInWithWebUI(provider: AuthProvider.google);
} on AmplifyException catch (e) {
    print(e.message);
}

此代码显示了 iOS 上的权限对话框。

如果无法做到这一点,那么在 Flutter 中使用 AWS 实现 Google 身份验证的替代方案是什么?

最佳答案

使用 .preferPrivateSession() 隐藏警报弹出窗口

登录时首选私有(private) session

Amplify.Auth.signInWithWebUI(presentationAnchor: self.view.window!, 
                             options: .preferPrivateSession()) { ... }

关于amazon-web-services - 自定义 AWS 身份提供商 iOS 权限消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68605103/

相关文章:

php - 处理 SRP 身份验证和生成设备 key (PHP - 服务器端)

node.js - 使用 context.succeed() 的 Node 单元测试 AWS Lambda 函数

amazon-web-services - 在Lambda函数中获取Cognito用户池身份

amazon-web-services - Terraform AWS Cognito 应用程序客户端

graphql - 如何防止访问 Amplify graphql 公共(public) API 中的某些字段

react-native - 在 React Native 上使用 Authenticator UI 自定义 AWS 放大

amazon-web-services - AWS Cognito 托管 UI - 国际化

amazon-web-services - DefaultHandshakeHandler 的 determineUser 未在生产服务器上调用

amazon-web-services - 如何将 Cognito Identity ID 附加到 AWS IoT 策略?

swift - AWS Amplify pod 安装依赖项版本错误