Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing GOTRUE_JWT_DEFAULT_GROUP_NAME results in: role "" does not exist #1362

Open
2 tasks done
Obeyed opened this issue Dec 22, 2023 · 2 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@Obeyed
Copy link

Obeyed commented Dec 22, 2023

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When GOTRUE_JWT_DEFAULT_GROUP_NAME=authenticated environment variable is not set then newly created users will have an empty role which breaks assumptions and results in role "" does not exist when postgrest and the database try to look up the role.

There is a deprecation warning regarding GOTRUE_JWT_DEFAULT_GROUP_NAME but removing it seems to break things. What's the correct solution if this environment variable is being removed in the near future?

To Reproduce

Don't set the GOTRUE_JWT_DEFAULT_GROUP_NAME=authenticated environment variable and invite a new user. The role column in the auth.users table will be empty.

Expected behavior

The role column is expected to be set otherwise

Additional context

Tried with docker image supabase/gotrue:v2.132.0

There is an old issue related to this that was closed by the auther, see: #948

@Obeyed Obeyed added the bug Something isn't working label Dec 22, 2023
@hf
Copy link
Contributor

hf commented Jan 9, 2024

Hey the notice is really about not using that with a custom role for now. It will be using authenticated or there'll be another way to define roles in the future.

@hf
Copy link
Contributor

hf commented Jan 9, 2024

I will fix the issue for removing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants