Skip to content

Commit

Permalink
Redirect logins to /profile
Browse files Browse the repository at this point in the history
  • Loading branch information
cephalization committed Oct 29, 2023
1 parent f16d39d commit 809fe78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/routes/login/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, GITHUB_CLIENT_ID, GITHUB_CLIEN

export const load = async ({ locals }) => {
const session = await locals.auth.validate();
if (session) throw redirect(302, '/');
if (session) throw redirect(302, '/profile');

return {
availableAuthProviders: {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/login/discord/callback/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const GET = async ({ url, cookies, locals }) => {
return new Response(null, {
status: 302,
headers: {
Location: '/'
Location: '/profile'
}
});
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/login/github/callback/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const GET = async ({ url, cookies, locals }) => {
return new Response(null, {
status: 302,
headers: {
Location: '/'
Location: '/profile'
}
});
} catch (e) {
Expand Down

0 comments on commit 809fe78

Please sign in to comment.