Skip to content

Example code update with CustomSupabaseSessionHandler and new page example with RLS #40

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

Merged
merged 4 commits into from
Nov 23, 2022

Conversation

rhuanbarros
Copy link
Contributor

@rhuanbarros rhuanbarros commented Nov 22, 2022

What kind of change does this PR introduce?

New feature.
Example code updated with CustomSupabaseSessionHandler and new page example with RLS

What is the current behavior?

The session is not saved to local storage.
There is no page example of working with table with policies.

What is the new behavior?

The session is saved to local storage.
There is a page example of working with table with policies.

Additional context

There is a bug with the SessionRetriever in the CustomSupabaseSessionHandler that I could not fix. Hopefuly I could fix later or could get some help.

@acupofjose
Copy link
Contributor

@rhuanbarros thanks for this! I think it's running into a race condition where supabase.InitializeAsync() is being called in multiple places and not completed before the page is rendered. I moved that into your custom auth handler instead and it seemed to be working for me!

Care to try it out?

@rhuanbarros
Copy link
Contributor Author

@acupofjose I just tested and it's working fine! I get what you did. Thank you
This helped me a lot
😄

@acupofjose acupofjose merged commit 542b4d7 into supabase-community:master Nov 23, 2022
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.

2 participants