Skip to content

Commit

Permalink
fix: 예외처리 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Xvezda committed May 7, 2024
1 parent d87f18b commit 40c47da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/api/src/services/auth/v1/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ const withSession: MiddlewareHandler<{
const payload = await verifyToken<SessionPayload>(c, sessionId ?? '');
user = payload['http:cheda.kr/user'];
} catch (e) {
if (!sessionSid) {
return c.json({ message: 'Unauthorized' }, 401);
}
const securedToken = await decryptToken(c, sessionSid ?? '');
const securedPayload = await verifyToken<SecuredSessionPayload>(c, securedToken);
const { refreshToken } = securedPayload['http:cheda.kr/user'];
Expand Down

0 comments on commit 40c47da

Please sign in to comment.