Skip to content

Commit

Permalink
Fix logout route signature
Browse files Browse the repository at this point in the history
  • Loading branch information
dudil committed Dec 4, 2023
1 parent 2669da4 commit 08d0573
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fastapi_msal/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ async def _post_token_route(
return BearerToken(access_token=token.id_token)

async def _logout_route(
self, request: Request, callback_url: OptStr, referer: Annotated[OptStr, Header()] = None
self, request: Request, referer: Annotated[OptStr, Header()] = None, callback_url: OptStr = None
) -> RedirectResponse:
# check if callback_url is set, if not try to get it from referer header
if not callback_url:
callback_url = referer if referer else str(self.return_to_path)
callback_url = referer if referer else str(self.return_to_path)
return self.handler.logout(request=request, callback_url=callback_url)

async def get_session_token(self, request: Request) -> Optional[AuthToken]:
Expand Down

0 comments on commit 08d0573

Please sign in to comment.