All Questions
Tagged with supabase react-native
64
questions
6
votes
4
answers
6k
views
keep user logged in while using supabase in react native
I built an auth function that looks like this:
const handleLogin = async (type) => {
const { user, error } =
type === "LOGIN"
? await supabase.auth.signIn({ email, ...
4
votes
2
answers
8k
views
new row violates row-level security policy for table "tasks"
I am new to supabase and am trying to integrate my Todo App made with BlueBase, a Framework based on react and react native. And, I am facing such a problem.
CreateTaskScreen.tsx
import React from '...
3
votes
3
answers
7k
views
Supabase onAuthStateChanged - How do I properly wait for the request to finish prevent flickering with useEffect?
Everything auth-wise is working fine. I even have a loading state setup so that the loader shows until the state is changed, but I still get this flickering on reload. This flickering only happens ...
3
votes
2
answers
797
views
Supabase join returning 1 object instead of list of objects
I am trying to query my posts table for a post, which contains the user's user_id and I want to join it with the profiles table using the user_id.
post table schema: (post_id: uuid, created_at: ...
3
votes
0
answers
342
views
ReferenceError: window is not defined in React Native project after adding Supabase call
I'm using a React Native project with Expo v49, and I added a Supabase call to read some data from the database, and it works on ios/android,
But when I open the web version, I get "...
3
votes
1
answer
2k
views
How to sign in with Apple and Google credentials in react-native and supabase
I have been trying to implement sign in with google and apple using the following libraries and supabase in bare react-native projects.
react-native-apple-authentication
react-native-google-signin
...
2
votes
1
answer
1k
views
Why am I getting "URL.hostname is not implemented, js engine hermes" when supabase is intialized?
I am building an expo project. So far I'm just trying to create the login/sign up auth logic. I want to use supabase. The project will load if there is no supabase initialization, but when supabase.js ...
2
votes
1
answer
1k
views
How to subscribe to realtime data from Supabase in React Native application?
When I try to subscribe to my Supabase database for realtime updates, I am able to listen to changes (Insert/Update/Delete) but my React state resets.
For example, let's say I get 5 names in the ...
2
votes
1
answer
806
views
supabase storage not downloading correctly
I am trying to download images that I have uploaded to my bucket as an ArrayBuffer as that is what is recommended by the docs when using react native. When downloading the file it returns a Blob. When ...
2
votes
1
answer
360
views
Is it advisable to use localStorage to store JWT for Expo for Web?
I'm using Expo Secure Store to store JWT credentials from Supabase:
const ExpoSecureStoreAdapter = {
getItem: (key: string) => {
return SecureStore.getItemAsync(key);
},
setItem: (key: ...
2
votes
2
answers
667
views
Expo/Supabase app receives a Network request failed error after a while
I have built an app with Supabase and Expo (React Native). The app works well and everything is fine. However, After I leave the app open for a while, I get an error which is difficult to track. It ...
2
votes
3
answers
746
views
react native supabase auth with google redirect issue & no session update
I am a little confused about trying to make a redirect URL to go along with the openAuthSessionAsync in app mobile browser view (docs: https://docs.expo.dev/versions/latest/sdk/webbrowser/#...
2
votes
0
answers
276
views
How can I get the image that OpenAI API returns and upload it to Supabase Storage?
I tried using the URL that is returned by default but there is a CORS issue on OpenAI's end which won't allow me to use fetch. So now I am trying to use b64_json but I cannot figure out how to get ...
1
vote
1
answer
92
views
images in React Native not rendering simultaneously
I am building a React Native app that loads images in parallel from storage in Supabase, before returning them to a list. I'm using a custom hook to retrieve the images from storage in Supabase:
...
1
vote
1
answer
2k
views
AuthApiError: Database error saving new user with react-native/supabase
I created a react-native app using supabase as a backend. Everything was working fine, I created my first user, signed it, etc., but now I'm trying to create a new user and I'm getting this error:
[...
1
vote
1
answer
3k
views
Supabase Auth - redirectTo not working for OAuth
I am switching from Flutter to Supabase and am running into an issue with Authentication. Although I can successfully launch the URL with the correct redirect value, I keep getting redirected to the ...
1
vote
1
answer
875
views
Supabase Redirect URL not working for Deeplinking
I am using Supabase for Auth with React Native and using React Navigation. When the user requests for password reset I set a redirect URL myApp://updatepassword. This link comes back with the link in ...
1
vote
1
answer
315
views
Unhandled JS Exception: Can't find variable: SharedArrayBuffer
I'm starting my react-native project using expo in the iOS version and getting this obscure error which is blocking development progress. I've only started to see this error after trying to setup the ...
1
vote
1
answer
561
views
Supabase Twilio Phone Auth
I am building a react native app using Supabase with phone auth on Android emulator.
I have set my twilio and Supabase up, but when I call supabase.auth.signUp(), it does not send a OTP to my phone ...
1
vote
1
answer
2k
views
TypeError: undefined is not an object (evaluating 'window.location.href')
i have been creating a app with supabase and expo and before it worked correctly...
but now it keeps getting this error...
TypeError: undefined is not an object (evaluating 'window.location.href')
at ...
1
vote
0
answers
55
views
React Native Expo Facebook Auth with Supabase and react-native-fbsdk-next: Nonces Mismatch
I'm trying to implement Facebook authentication in a React Native Expo app using Supabase and react-native-fbsdk-next. I'm currently following the Google auth implementation guide provided by Supabase ...
1
vote
0
answers
76
views
Supabase Auth not working unless application is refreshed
I'm currently using supabase auth for users to sign in and sign out into an application I'm working on. I have this simple function that handle signing in:
const signIn = async (email: string, ...
1
vote
0
answers
68
views
Unable to Update first_name and last_name Columns in public.profiles Table Using Supabase (React Native)
I'm working on a project that uses Supabase as the backend, and I've set up a public.profiles table to store user profile information. The table structure looks like this:
create table
public....
1
vote
0
answers
2k
views
Yarn install stuck on building packages
after yarn install complete, it seems started another thread and it just sutck at there forever, doese somebody ever had this problem? Is this a problem of supabase?
stuck after finishied building
...
1
vote
0
answers
230
views
Supabase session not saved with React Native after cold-start
I have an issue regarding supabase sessions after cold-starting the app.
Everytime I force quit the app on the phone, its asking me to sign in again.
Here is my API.js
export const api = createClient(...
1
vote
1
answer
72
views
React / React-Native : Can I trigger methods in two different components based on a trigger?
For a chat application I am making, I have two screens - one displaying the contacts with a notification blimp to show new messages and one screen displaying the chat with a contact. I have my ...
1
vote
0
answers
375
views
Expected a string or a class/function but got: undefined - React Native Error
I am extremely new to React Native and keep running into errors. Coming from Flutter, I have no idea how to handle some of these errors. Right now I have two screens with their own navigation stacks ...
1
vote
1
answer
1k
views
Supabase: Unable to validate email address: invalid format
I integrated supabase with react-native I followed this article
But I couldn't signUp
import AsyncStorage from '@react-native-async-storage/async-storage'
import { createClient } from '@supabase/...
1
vote
2
answers
876
views
Session always returns as undefined in Expo app using Supabase auth
I am following this example - https://supabase.com/docs/guides/with-expo
The login and account creation works as expected.
The issue is on the accounts page the Session is returning at undefined even ...
0
votes
2
answers
169
views
Special case of useState, what is this?
I'm doing react-native project with expo + supabase.
From its QuickStart docs, (https://supabase.com/docs/guides/with-expo#launch)
import 'react-native-url-polyfill/auto'
import { useState, useEffect }...
0
votes
3
answers
401
views
Where do we store user data after login in React Native
I am new to React Native and app development. So I am making a basic app that once opened, a modal opens up for use to login. User authenticates with Supabase, and then modal goes away to user can ...
0
votes
1
answer
387
views
How to upload an image from gallery to supabase storage
I want users to be able to pick a profile picture from the gallery using the Image Picker from expo and upload it to supabase in a filename that is structured like this userid.jpeg. I then want to ...
0
votes
1
answer
470
views
Supabase and expo check if user is connected
I'm using the supabase authentication system in my expo app and I'd like to know how to redirect the user to the Login screen when he's not logged in.
I've followed the instructions but even if I log ...
0
votes
1
answer
546
views
Resetting Password with React Native, Supabase, and Auth Flow
I've been having trouble resetting the password in my React Native app that uses Supabase and an auth flow. The App function uses the useUser hook to retrieve a Boolean value called AppStacktrue. If ...
0
votes
1
answer
709
views
undefined is not an object(evaluating 'this.localStorage.getItem') error in react-native
I tried to implement supabase with react-native expo app. Then got this error when trying to call a GET API call to get all data from 'Players' table but got an error in localstorage. How to fix this
...
0
votes
1
answer
24
views
Supabase user data not loaded on time when app is loaded so I get null
So in my React Native app, I have screen that grabs user data and pass it to sub components.
However, the code gives the below error which seems it is not rendered before the screen OR maybe it is ...
0
votes
1
answer
179
views
Expo with Supabase crashes on device but works on Expo Go
I have an expo app with supabase. It works find on Expo Go but when I build an apk and install it on a real device, it crashes. After investigation, I have found out that supabase is the reason for ...
0
votes
2
answers
173
views
Cannot upload most video files to supabase server in React Native
I have the issue that some files, for example many videos seemingly cannot be properly uploaded with base64 encoding, but with React Native the update function of supabase only works with base64 ...
0
votes
1
answer
855
views
supabase + react native: Access token not refreshed after a week of inactivity
I use the @supabase/supabase-js (v2.23.0) sdk in my expo react native application.
To initialise the react native client I do
createClient(
'<supabaseUrl>',
'<anonKey>',
{
auth: {...
0
votes
1
answer
857
views
react native supabase facebook login redirect callback site url
I am trying to login with facebook using Supabase on ios emulator. After logging in with Facebook, it redirects me back to localhost. I don't know exactly what to do on this side. Can you help me? I'm ...
0
votes
1
answer
985
views
Supabase realtime subscriptions times out
Im trying to listen to realtime changes in my react-native app from a supabase table called "profiles". Whatever i try, i can't get it to subscribe to change son the table. Even when copying ...
0
votes
1
answer
768
views
Supabase storage file upload from React Native times out, video file gets corrupted
I use the following code for uploading videos from my React Native app to Supabase storage:
const fileExt: string = videoUri.split('.').pop() ?? 'mov'
const filePath = `users/${session?.user?.id ?? '...
0
votes
1
answer
934
views
How to insert shopping cart items to supabase
I have successfully added a row in a table called "order" that has the user information, I would like to add the items details individually to a separate table called "order_storeItems&...
0
votes
0
answers
7
views
Apple Sign-In Not Returning Email or Name in Expo React Native App After Custom URL Update on Supabase
I'm using Expo's Apple Authentication for sign-in in my React Native app, following the guide here: https://docs.expo.dev/versions/latest/sdk/apple-authentication/
We've recently updated to a custom ...
0
votes
1
answer
44
views
+50
Supabase, how to get the session on the mobile, after the account has been confirmed on the website
I have the following scenario.
A user creates an account on a mobile app and lands in the /confirm screen on the mobile app.
A user confirms the created account via clicking on the confirmation link ...
0
votes
1
answer
51
views
Expo, Supabase Google-Sign-In DEVELOPER_ERROR. NOT using Firebase
I'm trying to get google oauth to work using Expo and Supabase, but I keep getting the below error ONLY when trying to sign in on Android. I am not using Firebase. I do not receive this error on web ...
0
votes
1
answer
35
views
how to persist user login
The problem is that I can't keep a user logged in with their user id to access supabase's tables to fetch or post data. I have two navigators, one for logged-in users and one for users who are not ...
0
votes
0
answers
13
views
Supabase corrupting file react native expo
when i try to upload a pdf file to the supabase bucket it uploads it but when i try to look at the pdf file manually through the supabase dashboard i cant open it and it gives me a error that reads &...
0
votes
0
answers
32
views
get my youtube account data react native app with supabase
im logging in with oauth2 with google auth and youtube . I can login with google but i want to login and get my youtube account when i login.
I noticed if you are trying to get personal data back from ...
0
votes
0
answers
57
views
Failed network request on Expo Go Android App
I'm adding the ability to upload an image to a users profile in my expo go app (Referencing this guide). However, I'm running into an issue only on android apps where I'm unable to upload the file to ...