Fix OAuth redirect in dev mode

This commit is contained in:
Stan Wohlwend 2024-06-26 04:47:48 +02:00
parent fd40498116
commit e0477e1421

View File

@ -21,7 +21,7 @@ export function OAuthCallback(props: { fullPage?: boolean }) {
} catch (e: any) {
setError(e);
}
if (!hasRedirected && process.env.NODE_ENV === 'production') {
if (!hasRedirected && (!error || process.env.NODE_ENV === 'production')) {
await app.redirectToSignIn();
}
}), []);