-
-
Notifications
You must be signed in to change notification settings - Fork 183
v2: Custom JWT -> Broken implementation #701
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
Comments
Turns out I was missing another place where the JWT needs updating:
Also here are the two patches needed for typescript to pass the typings checks..
|
+1 Needed for this example https://docs.moralis.io/docs/web3-supabase-authentication#make-client-side-requests-using-the-jwt |
Honestly not sure exactly where this issue belongs -- but let's see if gotrue-js is the right one. |
Closing due to inactivity. Not sure what this issue is trying to explain? Please re-open if still relevant. |
Bug report
Custom JWT's in v2 don't work
Describe the bug
The bug and a semi-workaround is documented in
supabase/supabase-js#553
I say semi, because for actually refreshing the JWT, the authorization headers must be refreshed in two places:
this.supabase.headers.Authorization =
Bearer ${supabaseToken}
;this.supabase.auth.headers.Authorization =
Bearer ${supabaseToken}
;To Reproduce
I'ts all in the bug
supabase/supabase-js#553
Expected behavior
I was waiting to see if custom JWT's were dropped as being supported, but now that v2 has been released, and that the migration docs show a "way" to use custom JWT's
https://supabase.com/docs/reference/javascript/upgrade-guide#use-a-custom-access_token-jwt-with-supabase
I guess it's the intention to support such feature.. Which clearly is broken..
Happy to help with any more info that may be needed
The text was updated successfully, but these errors were encountered: