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.

[Tracking] Validate token refresh issue across providers

See original GitHub issue

This 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:

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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
viperfxcommented, Feb 4, 2021

Oh! Thank you both for pointing that out! I will upgrade today!

1reaction
dac09commented, Jan 13, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

What Are Refresh Tokens and How to Use Them Securely
This post will explore the concept of refresh tokens as defined by OAuth 2.0. We will learn how they compare to other token...
Read more >
A Critical Analysis of Refresh Token Rotation in Single-page ...
Investigate the security properties of refresh tokens in the browser and discover the limitations of refresh token rotation in frontend web ...
Read more >
Authentication and Authorization: Refresh Tokens - OCLC
Refresh Tokens are issued to the client by the authorization server upon request of an Access Token. Refresh Token are typically longer lived ......
Read more >
The Ultimate Guide to handling JWTs on frontend clients ...
For the purposes of auth, a JWT is a token that is issued by the server. The token has a JSON payload that...
Read more >
Refresh access tokens - Okta Developer
Okta validates the incoming refresh token and issues a new set of tokens. As soon as the new tokens are issued, Okta invalidates...
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