From robert.parker at weareact.com Tue Sep 26 09:23:55 2017 Content-Type: multipart/mixed; boundary="===============5199760461829932176==" MIME-Version: 1.0 From: Robert Parker To: keycloak-user at lists.jboss.org Subject: [keycloak-user] How to redirect user back to original application from account management pages Date: Tue, 26 Sep 2017 13:23:51 +0000 Message-ID: --===============5199760461829932176== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable I am using the keycloak javascript adapter and have a Profile link in my ma= in application which makes a call to the adapter's `accountManagement()` fu= nction to redirect to the keycloak account management screens for the logge= d in user. What I can't figure out is how to redirect back to my main application afte= r changes have been saved or when the user cancels the account management s= creens. Looking inside the account.ftl template for the themed user account screen,= I see the following: <#if url.referrerURI??>${msg("backToApplicat= ion")}/a> This link does not appear for me, so this referrerURI property is clearly n= ot 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()` ad= apter 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(a)weareACT.com 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 n= ot 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 infor= mation which is confidential and/or covered by legal professional or other = privilege (or other rules or laws with similar effect in jurisdictions outs= ide 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 ma= ke no representation or accept any liability for its accuracy or completene= ss unless expressly stated to the contrary. [http://www.weareact.com/media/11610/email_footer_tree.gif]Please consider = the environment before printing this email. ________________________________ --===============5199760461829932176==-- From ssilvert at redhat.com Tue Sep 26 12:52:42 2017 Content-Type: multipart/mixed; boundary="===============4389772705553229576==" MIME-Version: 1.0 From: Stan Silvert To: keycloak-user at lists.jboss.org Subject: Re: [keycloak-user] How to redirect user back to original application from account management pages Date: Tue, 26 Sep 2017 12:52:42 -0400 Message-ID: In-Reply-To: AM4PR04MB153771DFFA33BCA9B05C90828A7B0@AM4PR04MB1537.eurprd04.prod.outlook.com --===============4389772705553229576== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable You need to set the referrer in the URL when you go to the account console. This explains it well: https://technology.first8.nl/add-manage-account-link-keycloak-redhat-sso/ On 9/26/2017 9:23 AM, Robert Parker wrote: > 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 log= ged in user. > > What I can't figure out is how to redirect back to my main application af= ter changes have been saved or when the user cancels the account management= screens. > > Looking inside the account.ftl template for the themed user account scree= n, I see the following: > > <#if url.referrerURI??>${msg("backToApplic= ation")}/a> > > 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(a)weareACT.com > www.weareACT.com > > Registered in England : 04476799 > ________________________________ > The information contained in or attached to this email is intended only f= or 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 t= he intended recipient, you are not authorised to and must not disclose, cop= y, distribute, or retain this message or any part of it. It may contain inf= ormation which is confidential and/or covered by legal professional or othe= r privilege (or other rules or laws with similar effect in jurisdictions ou= tside Northern Ireland, England and Wales). > > The views expressed in this email are not necessarily the views of Applie= d Card Technologies Ltd. The company, its directors, officers or employees = make no representation or accept any liability for its accuracy or complete= ness unless expressly stated to the contrary. > [http://www.weareact.com/media/11610/email_footer_tree.gif]Please conside= r the environment before printing this email. > ________________________________ > _______________________________________________ > keycloak-user mailing list > keycloak-user(a)lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user --===============4389772705553229576==--