[Tracking] Validate token refresh issue across providers
See original GitHub issueThis is a “meta issue” to track what auth providers have an issue, where the token is not automatically refreshed
Verified working
- firebase automagically refreshes the token, when getToken is called and the token is expired
- supabase needs client config. This needs to be configured by the user, not within RW.
Not verified:
- goTrue
As is:
- magicLink
Needs fix:
- netlify
- auth0 Auth) requires user configuration. Added to various docs
- azureActiveDirectory Needs fix, see comment https://github.com/redwoodjs/redwood/issues/1636#issuecomment-768240131
Related to: #1627, #1576, #1608, #927, #738
Help needed with:
a) Working out if this issue exists in each of the providers above
b) Comment on this issue if you find a unticked provider with their default expiry times
c) Working out if the auth client needs any extra code or configuration in the packages/src/authClients
to refresh its token automatically when getToken
is called, or if it is handled internally by the authClient (such as firebase)
How to reproduce
- Log into your RW app
- Wait for access token to expire (this will vary, based on your provider)
- Navigate to another page that needs auth to fetch data
Very important!
You won’t notice the issue if you refresh the page, but its decent way of validating if the token refresh is handled for us. If you refresh and find that you got logged out, it is an indication that the client probably does not auto refresh the accessToken.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:16 (9 by maintainers)
Oh! Thank you both for pointing that out! I will upgrade today!
Provider: supabase
It looks like supabase needs a config https://github.com/supabase/supabase-js/blob/a5dc5d252a1ec7c9c2c2a5682dd77868fe2c3a97/src/lib/SupabaseAuthClient.ts#L8
thanks @dthyresson for the link
And this is how its used