Skip to content

Realtime 401 error in Nextjs #26932

Answered by GaryAustin1
pablojsx asked this question in Questions
May 31, 2024 · 5 comments · 5 replies
Discussion options

You must be logged in to vote

See the trouble shooting section here for some code to fix the grants if that is your issue.
https://supabase.com/partners/integrations/prisma
Prisma during migrations often wipes out Postgres grants to the public schema.

grant usage on schema public to postgres, anon, authenticated, service_role;

grant all privileges on all tables in schema public to postgres, anon, authenticated, service_role;
grant all privileges on all functions in schema public to postgres, anon, authenticated, service_role;
grant all privileges on all sequences in schema public to postgres, anon, authenticated, service_role;

alter default privileges in schema public grant all on tables to postgres, anon, authentic…

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@pablojsx
Comment options

@GaryAustin1
Comment options

Answer selected by GaryAustin1
@ladderschool
Comment options

@mark-antal-csizmadia
Comment options

@stpn48
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants