konga
05/20/2022, 6:43 PMconst { user, session, error } = await supabase.auth.signUp({
email: 'example@email.com',
password: 'example-password',
})
I have set the anon and supabase url and it works because I can hit the regular rest api. When I use the the auth function, it calls the wrong endpoint.
http://localhost:3000/undefined/auth/v1/signup
It should be calling the supabase url and instead of
http://locahost:3000/undefined
konga
05/20/2022, 9:48 PMimport { createClient } from '@supabase/supabase-js'
let supabaseUrl = process.env.SUPABASE_URL
let supabaseAnonKey = process.env.SUPABASE_ANON_KEY
export const supabase = createClient(supabaseUrl, supabaseAnonKey)
Because this is typescript, supabaseUrl
and supabaseeAnonKey
are type string | undefined
and they default to undefined at the startgaryaustin
05/20/2022, 10:21 PMkonga
05/21/2022, 3:36 AM