Skip to content

Commit b253e31

Browse files
committed
fix: raise console error in case of missing token or userId
1 parent 04656fc commit b253e31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/auth/auth.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ export async function refreshAccessToken(
7777
refreshToken: string,
7878
userId: string,
7979
): Promise<OidcTokenData | null> {
80+
if (!refreshToken || !userId) {
81+
console.error("[Auth] Missing refresh token or userId");
82+
return null;
83+
}
84+
8085
try {
8186
const tokenEndpoint = await getTokenEndpoint();
8287

0 commit comments

Comments
 (0)