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.

Issues with the refresh endpoint endlessly redirecting after signin

See original GitHub issue

We’re using v2.1.0 (vanilla, nothing fancy/special). Occasionally, a user will get stuck in this redirect loop. I suspect it’s when the JWT expires, and a lazy evaluation happens. Not all the time, but sometimes, it will put the browser into this constant back and forth redirect ping thing that keeps showing the message/image displayed below. If you look at the XHR request stuff, you’ll see that it’s just endlessly redirecting from the /refresh endpoint, to the cognito /auth and /login endpoints. I can post the XHR’s (once I sanitize them), if needed.

This might be due to a refactor done recently for this version that has the JWT refreshed lazily perhaps?

I’ve tried with the JWT expiration set to 1 hour, 12 hours, 24 hours, and 5 minutes and the same thing. It just changes how fast the cycles go before this issue manifests/gets recreated.

For the end user, there’s no solution other than clearing cookies to correct this problem. Once they sign in again, the problem goes away for several refreshes, some unknown number (can’t recreate it consistently, it appears to be a timing thing) before it hits again.

I’m going to try reverting back to a previous version of the app (v2.0.19) to see if this has any positive impact.

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
bedakacommented, May 3, 2022

@HudsonAkridge could you finally solve this issue? As it seems like we’re experiencing the same problem I would appreciate any hints how to approach this.

0reactions
ottokrusecommented, Jun 3, 2022

Closing for now, can re-open if further info surfaces

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the Login Redirect and Refresh Problem in ...
Start by clearing the cache and cookies of your web browser. Restart the program and try to log into your website again. Clear...
Read more >
Help! I'm Stuck in a Redirect Loop! - ScottBrady91
A common issue with when integrating with an OpenID Provider, such as IdentityServer4, is getting caught in an infinite redirect loop.
Read more >
React sample keeps redirecting after login · Issue #21 - GitHub
Steps to reproduce: Sign out of any/all browser instances of the azure portal; Start the React sample; Click Login Expected results:
Read more >
3 Ways to Fix WordPress Login Refreshing & Redirecting
The quickest way to solve the WordPress login redirect issue is by clearing your browser cookies and cache. WordPress uses cookies to store ......
Read more >
authorize or /login/callback endless loop - OAuth/OIDC
It looks like your customAuthHandler checks if there is a previous authSate or if the user is not authenticated and does a redirect...
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