mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
don't cache social-auth-core backends
social-auth-core uses a global variable to cache backend settings:
78da4eb201/social_core/backends/utils.py (L9)
when loading backends, forcibly ignore this behavior to avoid
a thread-safety issue that causes #4788 #4045
This commit is contained in:
parent
4ce69f2f9c
commit
cae8950723
@ -518,7 +518,7 @@ class AuthView(APIView):
|
||||
def get(self, request):
|
||||
data = OrderedDict()
|
||||
err_backend, err_message = request.session.get('social_auth_error', (None, None))
|
||||
auth_backends = load_backends(settings.AUTHENTICATION_BACKENDS).items()
|
||||
auth_backends = load_backends(settings.AUTHENTICATION_BACKENDS, force_load=True).items()
|
||||
# Return auth backends in consistent order: Google, GitHub, SAML.
|
||||
auth_backends.sort(key=lambda x: 'g' if x[0] == 'google-oauth2' else x[0])
|
||||
for name, backend in auth_backends:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user