hopefully fix login loop
This commit is contained in:
parent
cf28aed45a
commit
c1eff928be
2 changed files with 3 additions and 3 deletions
|
@ -5,6 +5,6 @@ export const load: PageServerLoad = ({ cookies }) => {
|
||||||
const apiKey = String(cookies.get('apiKey') ?? '');
|
const apiKey = String(cookies.get('apiKey') ?? '');
|
||||||
|
|
||||||
if (!apiKey) {
|
if (!apiKey) {
|
||||||
return redirect(301, `${process.env.API_URL}/auth/new-login`);
|
return redirect(307, `${process.env.API_URL}/auth/new-login`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,8 +12,8 @@ export const GET: RequestHandler = async ({ url, cookies }) => {
|
||||||
secure: true,
|
secure: true,
|
||||||
sameSite: 'strict'
|
sameSite: 'strict'
|
||||||
});
|
});
|
||||||
return redirect(301, '/new/dashboard');
|
return redirect(302, '/new/dashboard');
|
||||||
} else {
|
} else {
|
||||||
return redirect(301, `/new/?error=${error}`);
|
return redirect(302, `/new/?error=${error}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue