File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ VITE_SUPABASE_URL = https://xxx.supabase.co
2+ VITE_SUPABASE_ANON_KEY = xxx
3+ VITE_SITE_URL = https://www.example.com
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ The Auth component is currently shipped with the following views:
227227const authView = ref (' sign_in' )
228228
229229const redirectTo = computed (() => {
230- return authView === ' forgotten_password' ? FORGOTTEN_PASSWORD_URL : REDIRECT_TO_URL
230+ return authView . value === ' forgotten_password' ? FORGOTTEN_PASSWORD_URL : REDIRECT_TO_URL
231231})
232232 </script >
233233```
Original file line number Diff line number Diff line change 6565 :localization =" {
6666 variables: I18nVariables
6767 }"
68+ :redirect-to =" redirectTo"
6869 show-links
6970 />
7071 </div >
@@ -199,6 +200,7 @@ const supabaseClient = createClient(
199200 // }
200201 // }
201202)
203+ const SITE_URL = import .meta .env .VITE_SITE_URL
202204
203205useSEOHeader ()
204206const { supabaseUser } = useSupabaseUser (supabaseClient )
@@ -243,6 +245,12 @@ const backgroundColor = computed(() => {
243245})
244246const theme = computed (() => (isDark .value ? ' dark' : ' default' ))
245247const I18nVariables = computed (() => (locale .value === ' en-US' ? en : zh ))
248+ const redirectTo = computed (() => {
249+ return view .value === ' forgotten_password'
250+ ? ` ${SITE_URL }/reset-password `
251+ : SITE_URL
252+ })
253+
246254watch (
247255 () => supabaseUser .value ,
248256 (newUser ) => {
You can’t perform that action at this time.
0 commit comments