[IdP] Passing custom query params (such as for language) to SAML login page
Web icon
Forge component by Rui Barbosa
Application Type
Traditional Web


We are confronted with the following situation:

We're using the IdP component to connect to Auth0 using SAML.  When logging in we are redirected to the Auth0 login page as expected, but we would like to set the language of the Auth0 login page based on the language (current locale) the user selected in our application.

As far as we can tell a way to do this would be to pass a query parameter 'language=fr' to the SAML login URL in the Preparation of the DoLogin page.  That parameter is then passed down by Auth0 to the actual universal login page where we can capture it and initialize the login widget in the correct language.

Appending this language query parameter to the SAML login URL would require us to change the IdP module, which we prefer not to do ourselves.  Would it be possible to add for example an optional 'CustomQueryParameters' input parameter of type Text to the DoLogin page?  That could then be used to pass custom query parameters that need to be appended to the SAML url.  We could use it for our language parameter, but it could later also be used for any other custom data that you might want to pass to the login page.  

At the bottom of the flow in DoLogin's Preparation the 'CustomQueryParameters' input parameter should then be URL encoded and appended to the redirect URL, like this:

URL + If(CustomQueryParams <> "", "&" + URL_Encode(CustomQueryParams) , "")

Could this change be added to IdP?  Or do you see another way of passing the language to the Auth0 login page?

Best regards,


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.