Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Dec 12, 2024
1 parent 724c97b commit dae1204
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion supertokens_python/recipe/oauth2provider/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async def auth_get(
httponly=morsel.get("httponly", True),
expires=datetime.strptime(morsel.get("expires", ""), "%a, %d %b %Y %H:%M:%S %Z").timestamp() * 1000, # type: ignore
path=morsel.get("path", "/"),
samesite=morsel.get("samesite", "lax"),
samesite=morsel.get("samesite", "lax").lower(),
)
return api_options.response.redirect(response.redirect_to)
elif isinstance(response, ErrorOAuth2Response):
Expand Down
2 changes: 1 addition & 1 deletion supertokens_python/recipe/oauth2provider/api/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def login(
httponly=morsel.get("httponly", True),
expires=datetime.strptime(morsel.get("expires", ""), "%a, %d %b %Y %H:%M:%S %Z").timestamp() * 1000, # type: ignore
path=morsel.get("path", "/"),
samesite=morsel.get("samesite", "lax"),
samesite=morsel.get("samesite", "lax").lower(),
)

return send_200_response(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,16 @@ async def authorization(

payloads = {"idToken": id_token, "accessToken": access_token}

request_body = {
"params": {**params, "scope": " ".join(scopes)},
"iss": await OpenIdRecipe.get_issuer(user_context),
"session": payloads,
}
if cookies is not None:
request_body["cookies"] = cookies
resp = await self.querier.send_post_request(
NormalisedURLPath("/recipe/oauth/auth"),
{
"params": {**params, "scope": " ".join(scopes)},
"iss": await OpenIdRecipe.get_issuer(user_context),
"cookies": cookies,
"session": payloads,
},
request_body,
user_context,
)

Expand Down

0 comments on commit dae1204

Please sign in to comment.