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.

Session lost on window refresh

See original GitHub issue

Hi guys,

I found that this lib is working fine if you log in throught keycloak, but if you refresh window (tipically if you are developing the app), it loses the session and have to re-enter keycloak for login.

You can try it in example-app. if you enter /secret , you could see token info. But if you press F5, you keep on /secret page but there is no token. This is because keycloak lib doesn’t authenticate the user.

I have googled but can’t find how to read cookie session and pass it to keycloak lib to authenticate.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mllullcommented, Nov 5, 2020

Oh my f***ing god!! My browser was locking KCServer Cookies!!! 🤦‍♂️

Now its working like a charm!! Many thanks @baltom ! I will create a PR adding silentCheckSsoRedirectUri config to example-app

Thanks!

0reactions
baltomcommented, Nov 5, 2020

hehe awesome! 😄 and we appreciate a PR!

Read more comments on GitHub >

github_iconTop Results From Across the Web

php - session lost after refreshing page - Stack Overflow
I tried with "location.reload(true);" and it is still the same. And in the main page, where the navigation bar is, I make the...
Read more >
session lost when page refresh - MSDN - Microsoft
By default, Session State is stored in memory (SessionState Mode "InProc"). When an unhandeld Error occurs on your page, the application pool ...
Read more >
[RESOLVED] Session lost when clicking refresh
when i try to refresh the page the session i echoed was lost. why?? ... where you expect to see evidence that it...
Read more >
Session Restore upon Browser Refresh
This means that upon page refresh/reload, the access token is lost, and your web application will be logged out. This page provides various...
Read more >
Session lost on page reload in "private browsing" mode #819
Nonetheless, this means that isAuthenticatedCookieName cookie is lost when the user refreshes the page (or opens the app in a new private tab)....
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