Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jun 12, 2024
1 parent abbe8d5 commit 2d3f21a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions endpoints/Auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fastapi import APIRouter, Request, Header, Depends
from fastapi import APIRouter, Request, Header, Depends, HTTPException
from Models import Detail, Login, UserInfo, Register
from MagicalAuth import MagicalAuth, verify_api_key
from sso.Google import get_google_access_token
Expand Down Expand Up @@ -101,7 +101,10 @@ async def google_login(request: Request):
code=data["code"], redirect_uri=data["referrer"]
)
if not access_token:
return Detail(detail="Invalid code"), 400
raise HTTPException(
status_code=400,
detail="Invalid code",
)
magic_link = auth.sso(
provider="google",
access_token=access_token,
Expand Down

0 comments on commit 2d3f21a

Please sign in to comment.