You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this same problem. For now, I'm accessing the accessToken.token to capture the user email address. Thanks to @abegehr for catching that issue - saved me another hour of troubleshooting.
npm install jwt-decode
import { jwtDecode } from 'jwt-decode';
...
if( appleResponse.result != null && appleResponse.result.accessToken ){
let decoded : any = jwtDecode(appleResponse.result.accessToken.token);
appleResponse.result.profile.email = decoded['email'];
}
The ID token for sign-in-with-apple seems to be a faulty JWT recently.
Checking the code, it the id token is passed as access token and the auth-code is passed as id token: https://github.com/Cap-go/capacitor-social-login/blob/main/ios/Sources/SocialLoginPlugin/AppleProvider.swift#L256 - why is the auth code being assigned to ID token instead of identityToken?
Ref: https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidcredential
The text was updated successfully, but these errors were encountered: