Is there any way to pass information from our app (using Auth0.js v9) to our hosted login page? Nothing in the documentation stands out except for state, but that doesn’t seem to be accessible from the login page.
Our use case is that, when the user’s session expires, we want to send them to the login page with an additional message shown explaining why they have to login (without the extra step of showing a dialog on our own page before we redirect them). Of course, we don’t want that message to appear for people that are logging in for the first time.
I’ve noticed some references to appState in the Auth0JS code. If I supply that parameter to authorize(), then it seems to be available in the hosted login page (under the query parameter app_state.
It’s not mentioned in the documentation, though. Is that something we can rely on?
I don’t remember specifics, but app_state didn’t seem to work the way I initially thought it did.
I never found a way to pass data from our app to our Auth0-hosted login page. If app_state is supposed to behave this way (it was undocumented, so I didn’t want to rely on it), then I can look into it again to see why it wasn’t working.
Hi there Konrad, I’m facing the same issue as spareosequist. Do you have a recommended way to pass parameters into the login page from elsewhere (i.e. my client application) ?
So here are the things I managed to discuss and establish internally.
Using Auth0.js, you should be able to pass parameters to the hosted login page using webAuth.authorize({ param: "value" });. Note that only these standard params should be used:
The param can be retrieved from the HLP with var myParam = config.extraParams.param;
Thanks for the reply. Just to clarify, there’s no way to pass custom data to a hosted login page? We can only pass those pre-determined standard parameters?
Our use case is being able to tell the login page “this user was automatically signed out because their session expired” so that we can display a message for them on the login page explaining what happened. It seems like that isn’t possible. Is that true?