-
-
Notifications
You must be signed in to change notification settings - Fork 545
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
Get Apple user first & last name from self.data
#483
Conversation
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Thank you. Is is planned to merge this PR? |
Yeah, I hope @omab could help 🤝 |
The name used to be included in the id_token, but this seems to have been changed by Apple and now it's sent in the `user` request param. python-social-auth/social-core#483 is the upstream PR for this - but upstream is currently unmaintained, so we have to monkey patch. We also alter the tests to reflect this situation. Tests no longer put the name in the id_token, but rather in the `user` request param in the browser flow, just like it happens in reality. An adaptation has to be made in the native flow - since the name won't be included by Apple in the id_token anymore, the app, when POSTing to the /complete/apple/ endpoint, can (and should for better user experience) add the `user` param formatted as json of {'firstName': 'John', 'lastName': 'Doe'} dict. This is also reflected by the change in the native flow tests.
The name used to be included in the id_token, but this seems to have been changed by Apple and now it's sent in the `user` request param. python-social-auth/social-core#483 is the upstream PR for this - but upstream is currently unmaintained, so we have to monkey patch. We also alter the tests to reflect this situation. Tests no longer put the name in the id_token, but rather in the `user` request param in the browser flow, just like it happens in reality. An adaptation has to be made in the native flow - since the name won't be included by Apple in the id_token anymore, the app, when POSTing to the /complete/apple/ endpoint, can (and should for better user experience) add the `user` param formatted as json of {'firstName': 'John', 'lastName': 'Doe'} dict. This is also reflected by the change in the native flow tests.
The name used to be included in the id_token, but this seems to have been changed by Apple and now it's sent in the `user` request param. python-social-auth/social-core#483 is the upstream PR for this - but upstream is currently unmaintained, so we have to monkey patch. We also alter the tests to reflect this situation. Tests no longer put the name in the id_token, but rather in the `user` request param in the browser flow, just like it happens in reality. An adaptation has to be made in the native flow - since the name won't be included by Apple in the id_token anymore, the app, when POSTing to the /complete/apple/ endpoint, can (and should for better user experience) add the `user` param formatted as json of {"email": "[email protected]", "name": {"firstName": "Full", "lastName": "Name"}} dict. This is also reflected by the change in the native flow tests.
@omab any chance you can review and merge this PR? Apple will reject any app submitted connecting to a server without this change (because they require importing the change), so Apple authentication is currently broken without this PR. |
The name used to be included in the id_token, but this seems to have been changed by Apple and now it's sent in the `user` request param. python-social-auth/social-core#483 is the upstream PR for this - but upstream is currently unmaintained, so we have to monkey patch. We also alter the tests to reflect this situation. Tests no longer put the name in the id_token, but rather in the `user` request param in the browser flow, just like it happens in reality. An adaptation has to be made in the native flow - since the name won't be included by Apple in the id_token anymore, the app, when POSTing to the /complete/apple/ endpoint, can (and should for better user experience) add the `user` param formatted as json of {"email": "[email protected]", "name": {"firstName": "Full", "lastName": "Name"}} dict. This is also reflected by the change in the native flow tests.
The name used to be included in the id_token, but this seems to have been changed by Apple and now it's sent in the `user` request param. python-social-auth/social-core#483 is the upstream PR for this - but upstream is currently unmaintained, so we have to monkey patch. We also alter the tests to reflect this situation. Tests no longer put the name in the id_token, but rather in the `user` request param in the browser flow, just like it happens in reality. An adaptation has to be made in the native flow - since the name won't be included by Apple in the id_token anymore, the app, when POSTing to the /complete/apple/ endpoint, can (and should for better user experience) add the `user` param formatted as json of {"email": "[email protected]", "name": {"firstName": "Full", "lastName": "Name"}} dict. This is also reflected by the change in the native flow tests.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@yuekui, what could we do about the failing checks reported by the Travis CI integration? |
Decoded `id_token` doesn't contain name info
Awesome! Thanks to everyone! 😃 |
Thanks! When is the next release expected? |
Hi @nijel any chance we could have a new release with this patch? |
Proposed changes
Decoded
id_token
doesn't contain name info, so we have to get such info fromself.data
Types of changes
Checklist
Other information
Solves #482 #501