gpt4 book ai didi

ios - 在真实设备上使用 Apple 登录无法获取姓名和电子邮件

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:20:02 25 4
gpt4 key购买 nike

所以我正在使用 Apple 实现登录,在模拟器上一切顺利,我请求电子邮件、fullName 范围、验证 UI 显示,并且我可以获取数据,如下图所示:

enter image description here enter image description here

但是在真实设备(iPadOS 13、iPad 2018)上测试时,UI 没有显示(它不要求在 UI 上输入姓名和电子邮件),而且我无法从响应中获取电子邮件、全名, 而且我也可以确认 authorizedScopes 是空的,我只能得到用户标识符

enter image description here enter image description here

我认为这是一个错误,将提交雷达,还在 Apple 开发者论坛上发表了讨论(但他们通常不会批准我的帖子,我不知道为什么)

如果这不是错误,有人可以告诉我如何解决这个问题吗?谢谢

最佳答案

问题解决了!长话短说

这是预期的行为

由 Apple 工程师回答(原帖链接:https://forums.developer.apple.com/thread/121496)

Hi aslkdjalksdjasdasd,

This behaves correctly, user info is only sent in the ASAuthorizationAppleIDCredential upon initial user sign up. Subsequent logins to your app using Sign In with Apple with the same account do not share any user info and will only return a user identifier in the ASAuthorizationAppleIDCredential. It is recommened that you securely cache the initial ASAuthorizationAppleIDCredential containing the user info until you can validate that an account has succesfully been created on your server.

Patrick

2019/12/15 编辑

此行为也记录在 Apple 的 Sign in with Apple 文档中,请查看 documentation .

Ensure that your app relays the credentials and user information to your app servers. The API collects this information and shares it with your app the first time the user logs in to the app using Sign in with Apple. If the user then uses Sign in with Apple on another device, the API doesn't ask for the user’s name or email again. It collects the information again only if the user stops using Sign in with Apple and later reconnects to your app.

关于ios - 在真实设备上使用 Apple 登录无法获取姓名和电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57545635/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com