zulip/zproject
Mateusz Mandera 48f80fcb0a 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.

https://github.com/python-social-auth/social-core/pull/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": "hamlet@zulip.com", "name": {"firstName": "Full", "lastName": "Name"}}
dict. This is also reflected by the change in the
native flow tests.
2020-10-22 12:07:46 -07:00
..
jinja2 python: Prefer kwargs form of dict.update. 2020-09-03 17:51:09 -07:00
__init__.py
backends.py auth: Expect name in request params in Apple auth. 2020-10-22 12:07:46 -07:00
computed_settings.py tornado: Merge the TORNADO_SERVER and TORNADO_PORTS configs. 2020-09-21 15:36:16 -07:00
config.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
configured_settings.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
default_settings.py settings: Typecast FREE_TRIAL_DAYS into integer. 2020-10-12 17:15:28 -07:00
dev_settings.py tornado: Merge the TORNADO_SERVER and TORNADO_PORTS configs. 2020-09-21 15:36:16 -07:00
dev_urls.py auth: Render config error page on configuration error. 2020-09-25 16:16:17 -07:00
email_backends.py dev_settings: Add EMAIL_PORT setting in zproject/dev_settings.py. 2020-08-04 11:03:40 -07:00
legacy_urls.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
prod_settings_template.py settings: Clean up Zoom configuration comments. 2020-10-18 15:14:12 -07:00
sentry.py sentry: Add additional context (client, fallback realm) to Sentry tags. 2020-09-11 16:43:29 -07:00
settings.py python: Add noqa comments for the specific star imports we allow. 2020-06-11 15:36:43 -07:00
terms.md.template docs: Capitalize Markdown consistently. 2020-08-11 10:23:06 -07:00
test_extra_settings.py tornado: Merge the TORNADO_SERVER and TORNADO_PORTS configs. 2020-09-21 15:36:16 -07:00
test_settings.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
urls.py auth: Render config error page on configuration error. 2020-09-25 16:16:17 -07:00
wsgi.py wsgi: Try to avoid extra django.setup calls. 2020-06-18 20:16:34 -07:00