Skip to content

Commit

Permalink
add prints
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Sep 11, 2024
1 parent d9ece2e commit 914e386
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions breathecode/authenticate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2008,14 +2008,7 @@ def get_google_token(request, token=None):
if token == None:
raise ValidationException("No session token has been specified", slug="no-session-token")

print("request.query_params", request.query_params)
print("request.GET", request.GET)
print('request.query_params.get("url", None)', request.query_params.get("url", None))

state = parse_qs(request.query_params.get("state", None))
print("state", state)

url = state.get("url", None)
url = request.query_params.get("url", None)
if url == None:
raise ValidationException("No callback URL specified", slug="no-callback-url")

Expand Down Expand Up @@ -2066,7 +2059,12 @@ async def save_google_token(request):
if error:
raise APIException("Google OAuth: " + error_description)

print("request.query_params", request.query_params)
print("request.GET", request.GET)
print('request.query_params.get("url", None)', request.query_params.get("url", None))

state = parse_qs(request.query_params.get("state", None))
print("state", state)

if state.get("url") == None:
raise ValidationException("No callback URL specified", slug="no-callback-url")
Expand Down

0 comments on commit 914e386

Please sign in to comment.