Skip to content

Commit

Permalink
feat: return token in json
Browse files Browse the repository at this point in the history
  • Loading branch information
dartt0n committed Jul 23, 2024
1 parent 9e87135 commit e1d95ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/http/routes/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,8 @@ async def login_handler(self, request: web.Request) -> web.Response:

return web.Response(
status=200,
headers={
"Location": self._build_location(request.query),
"Set-Cookie": f"AccessToken={container.to_string()}; HttpOnly",
},
text=ujson.dumps({"accessToken": container.to_string()}),
headers={"Content-Type": "application/json"},
)

def _build_location(self, query):
Expand Down

0 comments on commit e1d95ef

Please sign in to comment.