forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auth: Expect name in request params in Apple auth.
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.
- Loading branch information
1 parent
b18a17f
commit 247c014
Showing
2 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters