Hello,
I am new to Keycloak.
In my company we trying to migrate an existing React frontend to Keycloak. In the React app we have a login, registration and forgotten password feature. Keycloak supports all of these but we decided to only use the login feature since we would need to 'rewrite' all pages to make them compatible to the ftl- format.
The login feature was relatively easy to achieve.
However, on the login page now the registration and forgot-password links must direct back to the original app.
The current flow is:
1. User access original page.
2. Keycloak React redirects the user to the Keycloak login page.
3. User logs in an is being redirected to the original page.
Now, 1. and 2. are also applicable for users which want to register or forgot their passwords. Only when they register, the original frontend is called with a different view which will not redirect to Keycloak.
So what I tried is this:
<a href="<#if pageRedirectUri?has_content>${pageRedirectUri}/forgot-password<#else>/forgot-password</#if>">Forgot password?</a>
It seems the if-statement is never true though. I kind of was expecting the content to be set with the query param redirect_uri.
Any way I can achieve this?