Update redirect URLs to use runtime config
This commit is contained in:
parent
7940f817d8
commit
b67b4709ce
@ -30,7 +30,9 @@ export default defineNuxtConfig({
|
||||
public: {
|
||||
supabaseKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNucGhwbnV2aGp2cXprY2J3emRrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDU4MTE3ODQsImV4cCI6MjA2MTM4Nzc4NH0.k3V9c2oiG8kufPa3_a4v6UdiGI6ML6-5lH2oifStB3I',
|
||||
supabaseUrl: 'https://cnphpnuvhjvqzkcbwzdk.supabase.co',
|
||||
supabaseRestURL: 'https://cnphpnuvhjvqzkcbwzdk.supabase.co/rest/v1'
|
||||
supabaseRestURL: 'https://cnphpnuvhjvqzkcbwzdk.supabase.co/rest/v1',
|
||||
// webpageBaseUrl: 'http://localhost:3000',
|
||||
webpageBaseUrl: 'https://paper-dynasty.netlify.app',
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
const supabase = useSupabaseClient()
|
||||
const client = useSupabaseClient()
|
||||
const config = useRuntimeConfig()
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
const { data, error } = await supabase.auth.signInWithOAuth({
|
||||
provider: 'discord',
|
||||
options: {
|
||||
redirectTo: 'http://localhost:3000/confirm'
|
||||
redirectTo: `${config.public.webpageBaseUrl}/confirm`
|
||||
}
|
||||
})
|
||||
if (error) {
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
const supabase = useSupabaseClient()
|
||||
const email = ref('')
|
||||
const config = useRuntimeConfig()
|
||||
|
||||
const signInWithDiscord = async () => {
|
||||
const { data, error } = await supabase.auth.signInWithOAuth({
|
||||
provider: 'discord',
|
||||
options: {
|
||||
redirectTo: 'http://localhost:3000/confirm'
|
||||
redirectTo: `${config.public.webpageBaseUrl}/confirm`
|
||||
}
|
||||
})
|
||||
if (error) console.log('OAuth login failed:', error)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user