Sign in with Apple - Different behaviour Simulator VS iPhone

回眸只為那壹抹淺笑 提交于 2019-12-04 13:10:44

It seems on Simulator you see sign-up flow (first time user experience) and on the device you've already passed through sign-up and now you see log-in flow (returning user experience). I'm not sure why doesn't simulator display the log-in flow, but it works the same way for me as well.

According to documentation and this thread you won't get user info (email and full name) on completion of the log-in flow:

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.

Because the user’s information isn’t shared with your app in any subsequent API calls, your app should store it locally, immediately after you receive it from the API response. In case of subsequent failures in your process or network, you can read the information from local storage and try processing it again.

There is a way to return to the sign-up flow on you device by revoking usage of Apple ID by your application. To do it you can go to device Settings → Passwords & Accounts → iCloud → Password & Security → Apps Using Your Apple ID → [NameOfYourApp] App → Stop Using Apple ID → Stop Using.

You also can visit your Apple ID App Security page to do it. It should look like this:

I took the image and some hints from What the Heck is Sign In with Apple?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!