redwoodjs / playground-auth

This repo demonstrates all the authentication providers that Redwood supports
https://redwood-playground-auth.netlify.app/
MIT License
34 stars 25 forks source link

Adds Supabase example code for auth state changes #90

Closed dthyresson closed 2 years ago

dthyresson commented 2 years ago

This PR adds the example code to subscribe and listen for auth state change events.

One can then reauthenticate when signed out in multiple tabs -- or do "some work" on other changes, like signing in or when your token is refreshed.