蘋果登入的invalid_grant問題記錄

osang發表於2020-09-10

最近在整合SignInApple時候一直報invalid_grant的問題。查閱各種文件也傳參也沒啥問題,網上各種資料寫的也不是很清楚。
最終找到官方論壇是因為client_id傳遞資料不對:developer.apple.com/forums/thread/...

關於apple登入的配置

配置不做過多介紹。
參考:github.com/Ahilmurugesan/socialite...
composer require ahilmurugesan/socialite-apple-helper
php artisan socialite:apple

Enter Team Id : apple開發者teamId
Enter Key Id: apple開發者後臺建立privateKey對應的id
Enter Client Id : 關鍵是這個client_id.如果你是Web應用 SignInAplle這裡傳遞是apple開發者後臺建立的serviceId;如果是Native應用,這裡傳遞是NativeApp的bundleId;
Enter Auth Key: apple開發者後臺建立的key檔案
Enter client secret refresh interval(days): apiServer生成的Jwt_token過期時間

本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章