简体   繁体   中英

How do I get name and email from Apple sign in?

I am implementing Apple sign in on my iOS app. I want to retrieve the user's name and email on every login. I think there's a way to do it with the API. I am trying the following URL in Postman, and it always returns a webpage - not any user data. https://appleid.apple.com/auth/authorize?client_id=com.greenrobot.endhunger.service&redirect_uri=https://greenrobot.com/&response_type=id_token%20code

Any ideas?

Edit: I am following the instructions here: https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms

With Sign in with Apple, you only get the email/name on first login. It's your responsibility to then store that information. Source:

The identification servers return the user status only when the user first uses Sign in with Apple with your app. Subsequent attempts don't return any information for this user status, such as after a disconnect and reconnect occurs or from other devices.

https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple

Also: https://developer.apple.com/forums/thread/121496

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM