簡體   English   中英

如何從 Apple 登錄中獲取名稱和 email?

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

我正在我的 iOS 應用程序上實現 Apple 登錄。 我想在每次登錄時檢索用戶名和 email。 我認為有一種方法可以使用 API。 我正在 Postman 中嘗試以下 URL,它總是返回一個網頁 - 而不是任何用戶數據。 https://appleid.apple.com/auth/authorize?client_id=com.greenrobot.endhunger.service&redirect_uri=https://greenrobot.com/&response_type=id_token%20code

有任何想法嗎?

編輯:我按照這里的說明進行操作: https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms

使用 Sign in with Apple,您只會在首次登錄時獲得電子郵件/姓名。 然后存儲該信息是您的責任。 資源:

僅當用戶首次將 Sign in with Apple 與您的應用程序一起使用時,標識服務器才會返回用戶狀態。 后續嘗試不會返回有關此用戶狀態的任何信息,例如在發生斷開連接和重新連接后或從其他設備。

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

另外: https://developer.apple.com/forums/thread/121496

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM