clarification on setting session using token
johndpope opened this issue · 8 comments
related
supabase/supabase-swift#49
there is an AuthClient class that has a method called get_client_with_access_token() but like you I am not sure how to instantiate this and use it. This repo would benefit greatly with an example of setting the session using the token in the readme or the fastAPI example folder.
+1 on this!!
Hey team,
Thanks for the query! Will note the request for an example in the README or an example elsewhere
Agreed that we should probably try to do a FastAPI Auth tutorial sometime. Going to move this to gotrue-py
for better tracking
Closing this out as there has been no activity on this issue and I think this is no longer an issue.
all good with this helper now thanks -
supabase/supabase-py#616
curious - when setting a session with access_token, do RLS policies apply?
naturally / logic is all server side. there's libraries that can talk with postgres directly that maybe suitable for bypassing RLS.
When I first left my comment here on Nov 19, 2022, I dropped using supabase because the python client did not respect RLS.
I write a lot of JS frontend, which has outstanding support for supabase (the library is fantastic) but never solved this RLS issue and never revisited to see if it was solved.
Basically, if user passes their JWT to my python server, I wanted the RLS policies to apply.
I had the same issue as this person:
supabase/supabase-py#616