404 on Signup in ReactNative app

Hi, I hope I'm right here! I am having problems with my signup. Here's my code:
import { createClient } from '@supabase/supabase-js'
import AsyncStorage from '@react-native-async-storage/async-storage'

import { API_ANON_KEY, API_BASE_URL, REST_API_PATH } from '../constants/Api'

const supabaseUrl = `${API_BASE_URL}${REST_API_PATH}`
const supabaseKey = API_ANON_KEY
const supabase = createClient(supabaseUrl, supabaseKey, {
localStorage: AsyncStorage,
})

let { user, error } = await supabase.auth.signUp({
email: 'someone@email.com',
password: 'CFWSEubppfanYfvhXYSo'
})
import { createClient } from '@supabase/supabase-js'
import AsyncStorage from '@react-native-async-storage/async-storage'

import { API_ANON_KEY, API_BASE_URL, REST_API_PATH } from '../constants/Api'

const supabaseUrl = `${API_BASE_URL}${REST_API_PATH}`
const supabaseKey = API_ANON_KEY
const supabase = createClient(supabaseUrl, supabaseKey, {
localStorage: AsyncStorage,
})

let { user, error } = await supabase.auth.signUp({
email: 'someone@email.com',
password: 'CFWSEubppfanYfvhXYSo'
})
What I get in response is a 404 with an empty object. This I can also see in the API logs. Has anyone here an idea what I am doing wrong? Would be very much appreciated! 🙏 Thank you in advance!
2 Replies
garyaustin
garyaustin4y ago
You should just pass the API_BASE_URL (most likely but can't be sure as you don't show it).
maija
maijaOP4y ago
Oh my I think you're right. Let's see... Oh gosh, I was working so long today, I just did not see it! Thanks so much ❤️

Did you find this page helpful?