Remove social oauth (Azure, Github, Google) (#15549)

Remove social oauth (Azure, Github, Google)

Co-authored-by: jessicamack <jmack@redhat.com>
This commit is contained in:
Djebran Lezzoum
2024-10-02 16:05:28 +02:00
committed by jessicamack
parent 2c2694ce89
commit bcd006f1a5
16 changed files with 92 additions and 1148 deletions

View File

@@ -689,8 +689,8 @@ class AuthView(APIView):
data = OrderedDict()
err_backend, err_message = request.session.get('social_auth_error', (None, None))
auth_backends = list(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])
# Return auth backends in consistent order: oidc, saml.
auth_backends.sort(key=lambda x: x[0])
for name, backend in auth_backends:
login_url = reverse('social:begin', args=(name,))
complete_url = request.build_absolute_uri(reverse('social:complete', args=(name,)))