-
Hi, I'm using spring-addons 7.6.12 and I would like some help. Currently in my application, after login, I end always in / even if I enter a different url, for example https://my-app/detail/123 In method savePostLoginUrisInSession of SpringAddonsServerOAuth2AuthorizationRequestResolver I see this:
and for what I understand I should pass the query parameter post_login_success_uri, now I tried to do it but it doesn't work, I am always redirected to /. Debugging your code I see that no parameters at all are present in request. Regardless of this, why should I pass a specific parameter? If I type https://my-app/detail/123, why am I redirected to the home page? Some clearification about my architecture:
Another request for info In method postProcess of SpringAddonsServerOAuth2AuthorizationRequestResolver:
the redirectUri is missing schema:host:port so for keycloak is an invalid redirect_uri, so I set com.c4-soft.springaddons.oidc.client.client-uri and it worked but here another problem arises for me because my application is multitenant and I have different host name for each tenant, for example: but client-uri property is unique, Is there a way to specify a dynamic client-uri? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
post log in/out request parameters & headers were introduced in 7.3.0. So, it should work with your version, even if you'd better bump Boot and addons versions to As per its Javadoc, the During an authorization code flow, the user-agent is redirected:
The URI used to redirect the user-agent to the BFF at steps If the Before |
Beta Was this translation helpful? Give feedback.
post log in/out request parameters & headers were introduced in 7.3.0. So, it should work with your version, even if you'd better bump Boot and addons versions to
3.5.5
and8.1.23
. If you observe empty values forpost-login-redirect-host
,post-login-redirect-path
,post-logout-redirect-host
, andpost-logout-redirect-path
when debugging the BFF, you should double-check that your frontend sends them. The issue is probably there.As per its Javadoc, the
client-uri
property is intended to hold the public URI for the OAuth2 client: the BFF, not the frontend(s).During an authorization code flow, the user-agent is redirected: