© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
42 replies
lucasb

RLS Update Own Profile - Denied

I am following the Public Access example in the docs to allow "User can update own profile" (https://supabase.com/docs/guides/auth/managing-user-data)

I am getting access denied for the policy:
create policy "Users can update own profile."
  on profiles for update
  using ( auth.uid() = id );
create policy "Users can update own profile."
  on profiles for update
  using ( auth.uid() = id );


using this update statement with the supabase js client:
const { data, error } = await supabase
  .from('profiles')
  .update({
    ...formValues,
  })
  .match({ id: user?.id });
const { data, error } = await supabase
  .from('profiles')
  .update({
    ...formValues,
  })
  .match({ id: user?.id });


any idea why? This is on a nextjs page where the user is authenticated
Screen_Shot_2022-08-25_at_11.49.45_PM.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

permission denied for rls-enabled table
SupabaseSSupabase / help-and-questions
4y ago
Profile not saving (RLS or code issue?)
SupabaseSSupabase / help-and-questions
7mo ago
Permission denied for table but RLS is disabled?
SupabaseSSupabase / help-and-questions
4y ago
Issues with UPDATE RLS policy
SupabaseSSupabase / help-and-questions
5mo ago