[keycloak-user] How to redirect user back to original application from account management pages

Robert Parker robert.parker at weareact.com
Tue Sep 26 09:23:51 EDT 2017


I am using the keycloak javascript adapter and have a Profile link in my main application which makes a call to the adapter's `accountManagement()` function to redirect to the keycloak account management screens for the logged in user.

What I can't figure out is how to redirect back to my main application after changes have been saved or when the user cancels the account management screens.

Looking inside the account.ftl template for the themed user account screen, I see the following:

<#if url.referrerURI??><a href="${url.referrerURI}">${msg("backToApplication")}/a></#if>

This link does not appear for me, so this referrerURI property is clearly not present on the url object being passed to the form. How can I set this? Is there an argument I need to be passing into the `accountManagement()` adapter call?

Thanks
________________________________
Robert Parker - Front End Developer
Applied Card Technologies Ltd
Cardiff Office
14 St Andrews Crescent
Caerdydd
Cardiff
CF10 3DD
+44 (0) 2922 331860

Robert.Parker at weareACT.com
www.weareACT.com<http://www.weareact.com>

Registered in England : 04476799
________________________________
The information contained in or attached to this email is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it. It may contain information which is confidential and/or covered by legal professional or other privilege (or other rules or laws with similar effect in jurisdictions outside Northern Ireland, England and Wales).

The views expressed in this email are not necessarily the views of Applied Card Technologies Ltd. The company, its directors, officers or employees make no representation or accept any liability for its accuracy or completeness unless expressly stated to the contrary.
[http://www.weareact.com/media/11610/email_footer_tree.gif]Please consider the environment before printing this email.
________________________________


More information about the keycloak-user mailing list