Passing data to register.ftl #86
Unanswered
htaimoor2010
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am integrating keycloak with my app. Due to some reason, I have to pass some custom parameters from query params to the register.ftl file. I have written a custom authenticator and have added it start of the registration flow so that I can access it before the register page is rendered. I have successfully extracted query param and now I want to use it in my register.ftl file.
I have added it in session attribute in authenticate method of my custom authenticator like this
context.getSession().setAttribute("patient_code","54321"); //for testing
And then tried to access it in ftl file like this:
Patient Code: ${attribute.patient_code}
But it is not working and I get error when register.ftl page is being rendered. The user is not created yet so cant use user attributes. I tried using context.getAuthenticationSession().setAuthNote but it didnt work either.
Is there any way I can achieve this? I may need to add some custom logic in authenticator and based on that, pass params to ftl, so I want to achieve it by p[assing from authenticator to ftl.
Beta Was this translation helpful? Give feedback.
All reactions