question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question - JWT Token Expiring Error When Querying Supabase Directly

See original GitHub issue

First off thank you for the application, I am using it as a reference for a solution I am creating.

I am running into a problem where I am getting an error saying

[1] { message: 'JWT expired', code: 'PGRST301', details: null, hint: null }

when doing queries in my application. I am confused because the call to getAuthSession is returning a valid session but when get the supabase client

    const supabaseClient = supabase(authSession?.accessToken as string);

and make a database call, it errors out

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
msevestrecommented, Aug 5, 2022

Hey @rphlmr Yes you are right. The verify session with supabase needs to happen indeed. I think this is a good compromise Thanks so much for the amazing answer 😊

0reactions
rphlmrcommented, Aug 9, 2022

Feel free to reopen as I made some changes since the day you open this issue 😬

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I handle a JWT expiring · Discussion #889 · supabase ...
The question is mainly how do I intercept this response from all supabase calls? ... refresh the token, but catching the error with...
Read more >
Part One: JWTs - Supabase
If a JWT is leaked to a malicious actor, they will be able to redeem it anywhere until the expiry date is reached...
Read more >
oauth 2.0 - How can I revoke a JWT token? - Stack Overflow
In general the easiest answer would be to say that you cannot revoke a JWT token, but that's simply not true. The honest...
Read more >
Blog | Zuplo Docs
This guide shows you how you can use a Zuplo API gateway to add Supabase JWT Authentication and Authorization to any API, running...
Read more >
How SuperTokens works
There are three components to SuperTokens: Frontend SDK: Responsible for rendering the login UI widgets and managing session tokens ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found