Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localstorage does not update when signinRedirect is called #1597

Open
JacobMcConomy opened this issue Jul 24, 2024 · 1 comment
Open

Localstorage does not update when signinRedirect is called #1597

JacobMcConomy opened this issue Jul 24, 2024 · 1 comment
Labels
question Further information is requested

Comments

@JacobMcConomy
Copy link

When I call my signinRedirect function, I pass in the localstorage as a url state parameter. I then sign in and get redirected to my app to complete the auth flow with a signinCallBack function. The issue is that the localstorage variable gets updated as I am redirected so by the time I am redirected to my app, the localstorage variable I passed over is undefined.

I need to pass over the localstorage like this because I am changing domains when I get redirected after my login.

My current set up is a react app running on localhost:3000, this initiates the login. I then am redirected to keycloak and login with a valid user. I then get redirected to my main app running on localhost:4200 and pass in the localstorage to update the localstorage on localhost:4200 and complete the login process.

Any help is appreciated!

@vvikene
Copy link

vvikene commented Aug 1, 2024

Not sure if understand you correctly you use mgr.signinRedirect({state})? if so, that state can be accessed on the user object returned by signinRedirectCallback

@pamapa pamapa added the question Further information is requested label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants