[keycloak-user] Custom registration attributes
Bruno Palermo
palermo at pobox.com
Thu May 10 18:59:11 EDT 2018
Lukasz,
I thought on something similar, but if the users don't go directly to the registration page the parameters gets lost.
I will run some tests and try.
Thanks for the help!
-----Original Message-----
From: Łukasz Dywicki <luke at code-house.org>
Sent: quinta-feira, 10 de maio de 2018 19:48
To: Bruno Palermo <bruno at bpic.io>
Subject: Re: [keycloak-user] Custom registration attributes
Hi Bruno,
Not an advice, but just an idea - you could do that with custom javascript injected into theme. This will be simplest thing to do which will move things from query string (visible to browser) to custom form fields. It's not reliable at all, but easy to get.
I took a look on code and form parameters are passed around in few places BUT your user who gets redirected do not submit any form per say making it impossible to fill in any hidden fields.
When someone visits your custom registration page its brower sends GET with text/html or similar content type, while form parameters are usually available with application/x-form-url-encoded.
Maybe there is someone from the team to answer, this is just my custom rant which can be completely wrong.
Cheers,
Lukasz
--
Code-House
http://code-house.org
On 10.05.2018 15:26, Bruno Palermo wrote:
> Lukasz,
>
> Yes I know that.
>
> But what I'm trying to achieve is for those attributes to be pre-filled with query parameters.
>
> Thanks,
> Bruno
>
> -----Original Message-----
> From: keycloak-user-bounces at lists.jboss.org
> <keycloak-user-bounces at lists.jboss.org> On Behalf Of Lukasz Dywicki
> Sent: quarta-feira, 9 de maio de 2018 07:37
> To: keycloak-user at lists.jboss.org
> Subject: Re: [keycloak-user] Custom registration attributes
>
> Hey Bruno,
> You can pass additional attributes via registration form. You just need to add additional form fields with "user.attributes.<XYZ>". In your case you would need to copy them into hidden inputs.
> Keycloak user will then have <XYZ> attribute with value sent over form.
>
> Kind regards,
> Lukasz
> --
> Code-House
> http://code-house.org
>
> On 08.05.2018 21:33, Bruno Palermo wrote:
>> Hi,
>>
>> I would like to track the source of users using user attributes.
>>
>> It's possible to pass query parameters like: utm_source, utm_medium,
>> utm_campaing and add them as custom attributes?
>>
>> How can I access query parameters on a custom provider?
>>
>> Thanks,
>> Bruno
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
More information about the keycloak-user
mailing list