How to pass user's language selection to React application

Hi,

We have implemented Universal login with classical lock widget and have a working language switcher which switches languages of Auth0 widget.

However we would like to pass the selected language to our ReactJS application where user is logging on from Auth0 in order to reduce duplicate language selection.

Please help! All hints that show the right direction are appreciated.

This question came up a few times in the forum:

https://community.auth0.com/t/passing-additional-inputs-from-universal-login-page/39581/8?u=mathiasconradt

Another option, in case it’s not mentioned in the linked questions, to use different callback urls, something like https://callback/?lang=de and https://callback/?lang=en

As I understand what you are trying to say is. In the login customisation html I can add some javascript that would somehow enrich the callback URL with ?language=lang, and then I could capture it on the front-end.

So how can I access and modify callback URL from Login customization script?

There have been couple of threads about this, but all are dead, for instance: Add Parameter to Callback URL - #5

Sorry, I misread the initial scenario. My thought was to add the parameter in the authorize call that you’re making from your client application (as opposed to the login page). I see that you wanted to have the switch in the Auth0 Login Page. In this case, it’s afaik not possible with the out of the box Login widget (Lock) that Auth0 provides on the login page.