Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/web/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
POLAR_ACCESS_KEY=your_polar_access_key
OPENAI_API_KEY=your_openai_api_key
VERCEL_URL=your_vercel_url_or_localhost
BLOB_READ_WRITE_TOKEN=your_blob_token
DATABASE_URL=your_supabase_database_url
NEXT_PUBLIC_POSTHOG_HOST=your_posthog_host
NEXT_PUBLIC_POSTHOG_API_KEY=your_posthog_api_key
4 changes: 3 additions & 1 deletion apps/web/src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const LoginForm = ({ setEmail, setSent }: LoginFormProps) => {
}
});

const publicUrl = process.env.NEXT_PUBLIC_VERCEL_URL || 'http://localhost:3000';

async function onSubmit({ value }: z.infer<typeof formSchema>) {
setLoading(true);

Expand All @@ -75,7 +77,7 @@ const LoginForm = ({ setEmail, setSent }: LoginFormProps) => {
const { error } = await supabase.auth.signInWithOtp({
email: value,
options: {
emailRedirectTo: 'https://bitspace.sh/dashboard'
emailRedirectTo: `${publicUrl}/dashboard`
}
});

Expand Down