|
|
@ -2,6 +2,7 @@ from rest_framework.response import Response |
|
|
|
from rest_framework.views import APIView |
|
|
|
from django.conf import settings |
|
|
|
|
|
|
|
|
|
|
|
class Social(APIView): |
|
|
|
permission_classes = () |
|
|
|
|
|
|
@ -13,8 +14,9 @@ class Social(APIView): |
|
|
|
'client_id': settings.SOCIALACCOUNT_PROVIDERS.get('okta').get('APP').get('client_id'), |
|
|
|
'redirect_path': '/social/complete/okta-oauth2', |
|
|
|
'authorize_url': |
|
|
|
'https://' + settings.SOCIALACCOUNT_PROVIDERS.get('okta').get('OKTA_BASE_URL') + |
|
|
|
'/oauth2/v1/authorize?response_type=code&client_id=' + settings.SOCIALACCOUNT_PROVIDERS.get('okta').get('APP').get('client_id') + |
|
|
|
'&scope=openid&state=unknown&response_mode=form_post' |
|
|
|
'https://' + settings.SOCIALACCOUNT_PROVIDERS.get('okta').get('OKTA_BASE_URL') |
|
|
|
+ '/oauth2/v1/authorize?response_type=code&client_id=' |
|
|
|
+ settings.SOCIALACCOUNT_PROVIDERS.get('okta').get('APP').get('client_id') |
|
|
|
+ '&scope=openid&state=unknown&response_mode=form_post', |
|
|
|
} if settings.SOCIALACCOUNT_PROVIDERS.get('okta').get('OKTA_BASE_URL') else {}, |
|
|
|
}) |