supabase-go icon indicating copy to clipboard operation
supabase-go copied to clipboard

JWT Token expired Issue

Open joaojhgs opened this issue 1 year ago • 2 comments

When using the client.Auth.User() function, if the JWT token is expired, the returned error is initialized but without the internal Error() function, meaning the error is not nil and there's no message.

I had to verify the value returned variable for error handling instead: image

joaojhgs avatar Sep 18 '23 17:09 joaojhgs

hmm i think I got the same problem here..... 🤔 🤔

ipoool avatar Dec 04 '23 13:12 ipoool

Sounds a bit like the issue I was having and fixed in my fork

https://github.com/emilkm/supabase-go/tree/recover_redirect_to

https://github.com/emilkm/supabase-go/blob/833087b0a28227ebb89aa4e7aec745f163fd7114/supabase.go#L104

With that change I can get the error, error_code, and error_description in ma app code and do whatever I need.

emilkm avatar Apr 08 '24 02:04 emilkm