Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant get email and name scopes #72

Open
asafg84 opened this issue May 28, 2022 · 6 comments
Open

Cant get email and name scopes #72

asafg84 opened this issue May 28, 2022 · 6 comments

Comments

@asafg84
Copy link

asafg84 commented May 28, 2022

Describe the bug
SignInWithApple.authorize({
clientId: [clientId],
redirectURI: [redirectURI],
scopes: 'email name',
state: '12345',
nonce: 'nonce',
})

Not returning email and name

To Reproduce
Steps to reproduce the behavior:
1.
SignInWithApple.authorize({
clientId: [clientId],
redirectURI: [redirectURI],
scopes: 'email name',
state: '12345',
nonce: 'nonce',
}).then(response => console.log(response))

Expected behavior
return response w name and email
{
response: {
authorizationCode: [authorizationCode],
email: [email]
familyName: [familyName]
givenName: [givenName],
identityToken: [identityToken],
user: [appleUserId]
}
}

Screenshots
Screen Shot 2022-05-28 at 12 49 23

Smartphone (please complete the following information):

  • Device: iPhone 6s
  • OS: 15.5
@agomezmart
Copy link

This is happening since you have already signed with Apple at least once. It is totally normal.

In order to get those values, go to Settings --> your profile --> Password and Security --> and remove your app in the list of apps that uses Apple ID

@metinjakupi
Copy link

I have the same problem

@raykin
Copy link

raykin commented Apr 16, 2024

Revoke sign in records doesn't work on plugin version 5.0.0.
I use the plugin to implement native AppleSignIn and AppleJs lib for desktop website and find out revoke sign in records can't work on Ionic app with this plugin, but works on desktop website.

@Plucks77
Copy link

Plucks77 commented Jul 5, 2024

From the response you get back, you have a identityToken. This is basically a JWT token, you can verify at https://jwt.io/, it'll have the user email.
So you will basically just need to decode the JWT on your application to have the information.

@raykin
Copy link

raykin commented Jul 29, 2024

@Plucks77 identityToken didn't always contain email. see my real example test.
edited_token_result
I used AI code example to parse identityToken, but no email at all.

So there is only one sign can guarantee email exist in Apple response. When use AppleID to login, if the screen asked user whether chose his own email or proxy email(hide user real email), then this AppleLogin will always contain email and name values in response.

@raykin
Copy link

raykin commented Jul 29, 2024

It's very interesting when ask AI, Google and Skype, they all said email can be extracted from identityToken. Unfortunately AI is wrong in this case. Google AI seems smarter than Skype. Because it's response is not absolute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants