myheats

Live heats, scoring and leaderboard for sport events
git clone https://git.in0rdr.ch/myheats.git
Log | Files | Refs | Pull requests | README | LICENSE

commit e0184afaafc48f337e107db6f75547cec045fd9a
parent 0ac6d10da0850fe1acfe3f7cd7ceac23ac94da0f
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sun, 25 Aug 2024 15:39:07 +0200

feat(login): use window location

Diffstat:
MREADME.md | 2--
Msrc/Auth.jsx | 5+----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/README.md b/README.md @@ -17,8 +17,6 @@ npm install # Export Supabase URI and database access key export VITE_APP_SUPABASE_URL= export VITE_APP_SUPABASE_KEY= -# Export the email magic link redirect URI -export VITE_APP_EMAIL_REDIRECT_TO=https://my-heats-instance.com # Start app for development npm run dev diff --git a/src/Auth.jsx b/src/Auth.jsx @@ -1,9 +1,6 @@ import { useState } from 'react' import { supabase } from './supabaseClient' -const emailRedirectTo = import.meta.env.VITE_APP_EMAIL_REDIRECT_TO - || 'http://localhost:5173' - function Auth() { const [loading, setLoading] = useState(false) const [email, setEmail] = useState('') @@ -17,7 +14,7 @@ function Auth() { email: email, options: { shouldCreateUser: false, - emailRedirectTo: emailRedirectTo + emailRedirectTo: window.location.origin }}) if (error) throw error alert('Check your email for the login link!')