Cannot get name & email with sign in with Apple on real device

后端 未结 2 1043
旧时难觅i
旧时难觅i 2021-02-13 10:06

So I\'m implementing sign in with Apple, everything goes well on the simulator, I request email, fullName scopes, the authenticate UI shows, and I can get the data, as images sh

相关标签:
2条回答
  • 2021-02-13 10:57

    Problem solved! tl;dr

    This is an expected behavior

    Answered by Apple Engineer (Original post link: 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 Edit

    This behavior is also documented on Apple's Sign in with Apple doc, check the 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.

    0 讨论(0)
  • 2021-02-13 10:59

    If someone fails in storing "user email", "first-name" first time, then he should follow the following steps:

    iPhone Settings -> Apple Id -> Password & Security -> Apple ID logins -> {YOUR APP} > Stop using Apple ID.

    0 讨论(0)
提交回复
热议问题