Skip to content

fix: use authenticated role when JWT default group name is unset - #2962

Open
pcbeingused333 wants to merge 2 commits into
supabase:masterfrom
pcbeingused333:fix/default-group-1362
Open

pcbeingused333 wants to merge 2 commits into
supabase:masterfrom
pcbeingused333:fix/default-group-1362

Conversation

@pcbeingused333

Copy link
Copy Markdown

When GOTRUE_JWT_DEFAULT_GROUP_NAME is unset, signup and admin user creation stored an empty role. PostgREST then fails with role "" does not exist. New users now get the authenticated role in that case. An explicit value is still stored as given, and leaving the variable unset does not turn on the deprecation warning.

The test checks that an empty setting still reads as empty, that the role used for a new user is authenticated, and that custom_role is kept when it is set.

Prepared with the help of an AI coding assistant.

Fixes #1362

The deprecated setting stays empty unless it is configured, so the
deprecation warning does not fire on every boot. New users still get
the authenticated role PostgREST expects.
@pcbeingused333
pcbeingused333 requested a review from a team as a code owner November 25, 2026 10:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing GOTRUE_JWT_DEFAULT_GROUP_NAME results in: role "" does not exist

1 participant