Keycloak state param in redirect URL on Login
See original GitHub issueI am having SSO implementation using keaycloak in an angular app and it is working fine, But on login into the application it redirects to the app URL with having state param in URL as below.

I am using angular-oauth2-oidc v10.0.3
Is there any way or config for removing the state param from URL.
AuthConfig:
export var authConfig: AuthConfig = {
issuer: 'https://keycloak.poc.com/auth/realms/local',
redirectUri: 'http://localhost:4200/',
responseType: 'code',
requireHttps: false,
showDebugInformation: true,
disableAtHashCheck: false
};
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Keycloak state param in redirect URL on Login - Bountysource
I am having SSO implementation using keaycloak in an angular app and it is working fine, But on login into the application it...
Read more >Is there any way I can redirect to login page without showing ...
I tested (1)java login page > (2)redirect to keycloak login page > (3)user ... it returns me the parameters (code, state and session...
Read more >Keycloak - use authorization code with state parameter
Once the user login is successfull the keycloak will respond back to your redirect url with the authorization code and also your state...
Read more >The importance of the “state” parameter in OAuth - Medium
The CLI application redirects the user's browser to the Keycloak login page and at the same time it starts the HTTP server on...
Read more >OIDC 'state' parameter is url-encoded twice in Token Response
a protected resource the app redirects to the Keycloak login screen and asks the user to sign in. ... the requested ID and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t know why this got closed but i am having the same problem of having the state in the URL after login. The hard part is, if you refresh the page in your first login attempt, keycloak will give you an error because of the long URL.
Thanks for quick response. Checked the flow using those breakpoints and it is going inside below codeblock of tryLoginCodeFlow
and clearing the params.
What I wanted to know is, if it is possible to never have that ?state param at anytime in URL. Both current and desired flow mentioned below:
Current Flow:
Desired Flow: (Without any state param in URL)