Skip to content

Commit

Permalink
add base path to redirect url
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Farina authored and Daniel Farina committed Nov 23, 2023
1 parent 97bacc7 commit f59879f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/unsaged/app/auth/signin/auth-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Database } from '@/types/supabase.types'

export default function AuthForm() {
const supabase = createClientComponentClient<Database>()
const providersFromEnv = process.env.AUTH_PROVIDERS ? process.env.AUTH_PROVIDERS.split(',') : [];
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL; // Access the environment variable

return (
<Auth
Expand All @@ -16,7 +16,7 @@ export default function AuthForm() {
theme="dark"
showLinks={false}
providers={['google']}
redirectTo="http://localhost:3000/auth/callback"
redirectTo={`${baseUrl}/auth/callback`} // Use the environment variable in the URL
/>
)
}

0 comments on commit f59879f

Please sign in to comment.