Compare commits

..

No commits in common. "decf0dc5224c6725f46536414a5d937ccf83fe76" and "32bfec36831a7ed0cee6b19ac358bf52b82b591d" have entirely different histories.

View File

@ -18,7 +18,6 @@ from django.utils.timezone import now
from django.views import View
from api.models import OAuthToken
from konova.sub_settings.django_settings import BASE_URL
from konova.sub_settings.sso_settings import SSO_SERVER_BASE, OAUTH_CODE_VERIFIER, OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET
@ -63,8 +62,6 @@ class OAuthLoginView(View):
"""
oauth_authentication_code_url = f"{SSO_SERVER_BASE}o/authorize/"
redirect_uri = f'{BASE_URL}{reverse("oauth-callback")}'
code_verifier, code_challenge = self.__create_code_challenge()
urlencode_params = urlencode(
@ -73,7 +70,11 @@ class OAuthLoginView(View):
"code_challenge": code_challenge,
"code_challenge_method": "S256",
"client_id": OAUTH_CLIENT_ID,
"redirect_uri": redirect_uri,
"redirect_uri": request.build_absolute_uri(
reverse(
"oauth-callback"
)
),
}
)
url = f"{oauth_authentication_code_url}?{urlencode_params}"