Auth0 Home Blog Docs

Reading state value in rules with hosted login



I’m using auth0.js v9.0.2 with the hosted login page. I am passing a custom state value and having it returned to me after login as expected, however, I don’t know how to access this value in the rules. The state value seems to be overwritten by the hosted login so when I attempt to access context.request.state it’s a different value but it’s apparently still aware of the original state value as it’s being plugged in to the return url.

Is there a way to access the state value in the rules in a hosted login environment?