-
Notifications
You must be signed in to change notification settings - Fork 180
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
Incorrect authorization on supabase.postgrest #272
Comments
Duplicate of #185 |
RLS still not working. I suspect the issue is related to the following code section in superbase-py/client.py:
This sets the bearer token to the api key, which is plain wrong when using authentication tokens ... Any ideas on this? |
Hey @digital-codes, Thanks for the query! Supabase introduced the concept of sessions so now on the js lib the |
Hey team, Going to close this issue in favour of tracking on #185 which is pinned. Do feel free to comment here if there are any other questions/concerns though. |
After doing:
... requests for data are still anonymous, rather than authenticated.
For example:
... will apply the RLS policy with
auth.uid()
returningNULL
.Inspecting the headers sent, it looks like the 'Authorization' header contains "Bearer" plus my anon key, rather than the JWT access token from authenticating.
If I add this bit of code after
supabase.auth.sign_in()
it starts working:Somehow the session data isn't making it from gotrue-py over to postgrest-py?
The text was updated successfully, but these errors were encountered: