Skip to content

Commit

Permalink
prefix redirect urls with next public
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Oct 18, 2024
1 parent 983ea18 commit 20bf669
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=

# For OAuth. Only use in production/staging. Should be:
# <https://add-your-url-here.com>/auth/callback
OAUTH_REDIRECT_URL=
NEXT_PUBLIC_OAUTH_REDIRECT_URL=
# For email/password login. Should be:
# <https://add-your-url-here.com>/auth/confirm
EMAIL_REDIRECT_URL=
NEXT_PUBLIC_EMAIL_REDIRECT_URL=
2 changes: 1 addition & 1 deletion src/components/auth/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function Login() {
provider,
options: {
redirectTo:
process.env.OAUTH_REDIRECT_URL ||
process.env.NEXT_PUBLIC_OAUTH_REDIRECT_URL ||
"http://localhost:3000/auth/callback",
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/signup/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function Signup() {
provider,
options: {
redirectTo:
process.env.OAUTH_REDIRECT_URL ||
process.env.NEXT_PUBLIC_OAUTH_REDIRECT_URL ||
"http://localhost:3000/auth/callback",
},
});
Expand Down
3 changes: 2 additions & 1 deletion src/components/auth/signup/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export async function signup(input: SignupWithEmailInput) {
// },
options: {
emailRedirectTo:
process.env.EMAIL_REDIRECT_URL || "http://localhost:3000/auth/confirm",
process.env.NEXT_PUBLIC_EMAIL_REDIRECT_URL ||
"http://localhost:3000/auth/confirm",
},
};

Expand Down

0 comments on commit 20bf669

Please sign in to comment.