-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix Apple Provider first and last name #3409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please show me the input argument of your profile callback both with and without your change in the core?
I really want to avoid putting provider specific code into the core.
// Contains the email, firstName, and lastName of Apple. | ||
// Needed beacuse apple does not send the name in the token (profile callback). | ||
// profile: {user: {email: '[email protected]', name: {firstName: 'John', lastName: 'Doe'}}} | ||
profile.user = JSON.parse(body?.user ?? query?.user ?? null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really object this change, especially if it's Apple only.
We tested this provider a few days ago, and this wasn't necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
iss: '...'
aud: '...',
exp: ...,
iat: ...,
sub: '...',
at_hash: '...',
email: '[email protected]',
email_verified: 'true',
auth_time: ...,
nonce_supported: true
}
This is the contents of profile without the changes. Name is not included. Name also isn't stored in the database without the changes I made.
Documentation isn't clear but
The modified name is only shared with your app and not with Apple, and hence isn’t included in the ID token.
https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple#3383768
Hi there! It looks like this issue hasn't had any activity for a while. It will be closed if no further activity occurs. If you think your issue is still relevant, feel free to comment on it to keep it open. (Read more at #912) Thanks! |
To keep things tidy, we are closing this issue for now. If you think your issue is still relevant, leave a comment and we might reopen it. Thanks! |
Hello! I would like to open this thread again because indeed the name for Apple provider does not work. The information is only contained in the body, Apple does not provide it elsewhere. Inside the body:
But later on when
The user data is totally omitted and cannot be retrieved anymore. Would love to have an update on this, thanks! |
+1 |
Re-adding apple firstName and lastName. The name is not sent in the response but the fix was removed in a recent commit. This commit re-adds the logic to add the first and last name to the profile.
Reasoning 💡
The name for a user is important.
Checklist 🧢
Affected issues 🎟
Fixes the changes made in #2875