mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Make access token warning just a log
This commit is contained in:
parent
82c923e03c
commit
f0bbdb1c34
@ -114,7 +114,7 @@ export async function decodeAccessToken(accessToken: string, { allowAnonymous, a
|
||||
decoded?.sub ?? undefined,
|
||||
(decoded?.refresh_token_id ?? decoded?.refreshTokenId) as string | undefined,
|
||||
);
|
||||
console.warn(`[Token decode] Access token expired for project ${decoded?.aud?.toString().split(":")[0]}, user ${decoded?.sub}. This is most likely not an issue, but if it happens frequently, it may be a sign of a misconfiguration.`, error);
|
||||
console.log(`[Token decode] Access token expired for project ${decoded?.aud?.toString().split(":")[0]}, user ${decoded?.sub}. This is most likely not an issue, but if it happens frequently, it may be a sign of a misconfiguration.`, error);
|
||||
return Result.error(error);
|
||||
} else if (error instanceof JOSEError) {
|
||||
console.warn("Unparsable access token. This might be a user error, but if it happens frequently, it's a sign of a misconfiguration.", { accessToken, error });
|
||||
|
||||
Loading…
Reference in New Issue
Block a user