Skip to content

Commit

Permalink
fix(auth): 미등록 유저 http status code 수정 (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcauto authored and web-flow committed Dec 11, 2020
1 parent f0d4e36 commit 9aaa4b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/apps/oauth/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def kakao_login(request: Request): # type: ignore
return RedirectResponse(response.history[0].headers["location"])


@oauth_client.get("/kakao/sign_in")
@oauth_client.get("/kakao/sign_in", response_class=RedirectResponse)
async def kakao_sign_in(
request: Request, session: Session = Depends(get_database_session)
) -> RedirectResponse:
Expand Down Expand Up @@ -123,7 +123,7 @@ async def kakao_sign_in(
app_token = create_access_token(
user_info, refresh_token=kakao_auth_response.refresh_token
)
redirect = RedirectResponse(url=settings.WEB_URI)
redirect = RedirectResponse(url=str(settings.WEB_URI))
redirect.set_cookie(
key="token", value=app_token, domain=settings.WEB_URI.host
)
Expand Down
2 changes: 1 addition & 1 deletion src/apps/oauth/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from fastapi.exceptions import HTTPException

UserNotFound = HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="해당하는 유저가 없습니다"
status_code=HTTPStatus.UNAUTHORIZED, detail="해당하는 유저가 없습니다"
)

InvalidToken = HTTPException(
Expand Down

0 comments on commit 9aaa4b8

Please sign in to comment.