Supabase getUser() returns undefined
Code: https://github.com/jwaddell10/PracticeScheduler
Hello! Currently building a React Native, Expo app with an express backend, using supabase auth.
I am able to (I believe) log a user in, when I create my session and export it throughout the app with useContext I'm able to see an access token, I pass this token to my backend in my authorization header as a bearer token `, and it logs on my backend as well
However, when I call getUser(token) server side with express
I get this error
I've reread the docs, and it says if you pass in access token it should be able to get the user. I've tried removing the token from getUser call and it has the same result. Any ideas?
I tested my RLS policies with impersonation and it worked, so I think it's because getUser is undefined and not finding the user that my issue is happening
Hello! Currently building a React Native, Expo app with an express backend, using supabase auth.
I am able to (I believe) log a user in, when I create my session and export it throughout the app with useContext I'm able to see an access token, I pass this token to my backend in my authorization header as a bearer token `, and it logs on my backend as well
However, when I call getUser(token) server side with express
I get this error
I've reread the docs, and it says if you pass in access token it should be able to get the user. I've tried removing the token from getUser call and it has the same result. Any ideas?
I tested my RLS policies with impersonation and it worked, so I think it's because getUser is undefined and not finding the user that my issue is happening
GitHub
Contribute to jwaddell10/PracticeScheduler development by creating an account on GitHub.