Provide state
object when handling errors in handleCallback
#586
Labels
enhancement
New feature or request
state
object when handling errors in handleCallback
#586
Describe the problem you'd like to have solved
I can't access the login
state
(as generated bygetLoginState
in the login handler) when handling OAuth errors (e.g.error=access_denied
) in the callback handler.Describe the ideal solution
Ideally the
state
object that I set in the login handler should be available when the callback handler deals with an OAuth error.Alternatives and current work-arounds
The Auth0 service returns the
state
parameter back in the URL (as per spec). I could read this parameter but since my app does not control serializing the state (it's this lib's concern) into the authorization request, I can't make any assumptions about how the state is encoded. FWIW it looks to be a base64 string of the JSON object I'm after.Additional information, if any
Would be nice to have access to the state we set on login so that I might have a better idea of what the user was trying to achieve before trying to login 😄
The text was updated successfully, but these errors were encountered: