Replies: 2 comments 2 replies
-
I've recently been having similar issues with that error. I found this discussion rather helpful. https://github.com/orgs/supabase/discussions/26791#discussioncomment-10086843 On updating the supabase packages, I haven't had a problem. {
"@supabase/ssr": "^0.4.1",
"@supabase/supabase-js": "^2.45.4"
} |
Beta Was this translation helpful? Give feedback.
1 reply
-
As I am using server side rendering, I will not use the API. The getUser() is working in pages. This is a bypass solution, I am still interested by a fix. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I am using Supabase whith prisma. I updated my Prisma model and discovered that mirgation would destroy the supabase auth tables. I decided to remove the multischema system from prisma.
Since I did this, I have an error on my route API getUser calls. I don't know if it is linked to the previous changes, but before I work on the Prisma model, it used to work.
I used 'npx supabase reset" and npx prisma db push. Those commands re-created my db with the changes. I created a new account, but now I have an authentication issue.
My cookies are in my browser and in the supabase auth table.
This is the thrown exception:
I read others getUser issues, but I think none of them happened in a such context and a such strange.
This is the "app/account/page.tsx" where the getUser Works. it is server rendered.
Works well, getUser() returns the connected user.
Not working: This is the API route, where the getUser returns the previous exception.
"src/app/api/tests"
It seems that it doesn't work either on this function that is called before the initialization of a tsx page:
getUser doesn't work so the app is redirected to signin, which is skipped because the suer is already logged.
This is the function used to create supabase client:
This is the package version:
Beta Was this translation helpful? Give feedback.
All reactions