Improve inner OAuth cookie error description

This commit is contained in:
Konstantin Wohlwend 2025-03-03 19:08:11 -08:00
parent 7920440eb6
commit 1b0f25cd7f

View File

@ -50,7 +50,7 @@ const handler = createSmartRouteHandler({
(await cookies()).delete("stack-oauth-inner-" + innerState);
if (cookieInfo?.value !== 'true') {
throw new StatusError(StatusError.BadRequest, "OAuth cookie not found. This is likely because you refreshed the page during the OAuth sign in process. Please try signing in again");
throw new StatusError(StatusError.BadRequest, "Inner OAuth cookie not found. This is likely because you refreshed the page during the OAuth sign in process. Please try signing in again");
}
const outerInfoDB = await prismaClient.oAuthOuterInfo.findUnique({