Skip to content

Commit bd6d3fe

Browse files
committed
docs: update docs
1 parent 8be7e03 commit bd6d3fe

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
VITE_SUPABASE_URL=https://xxx.supabase.co
2+
VITE_SUPABASE_ANON_KEY=xxx
3+
VITE_SITE_URL=https://www.example.com

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ The Auth component is currently shipped with the following views:
227227
const authView = ref('sign_in')
228228
229229
const 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
```

src/App.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
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
203205
useSEOHeader()
204206
const { supabaseUser } = useSupabaseUser(supabaseClient)
@@ -243,6 +245,12 @@ const backgroundColor = computed(() => {
243245
})
244246
const theme = computed(() => (isDark.value ? 'dark' : 'default'))
245247
const 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+
246254
watch(
247255
() => supabaseUser.value,
248256
(newUser) => {

0 commit comments

Comments
 (0)