This is a followup to this topic regarding a redirect after login and more specifically about redirecting the user to a URL he was trying to access before logging in.
I checked the documentation about redirecting users with state parameters but it’s not entirely clear where to do that in a self-hosted auth0 implementation. Could anyone provide more technical details on where and when the state parameter can be accessed?
The redirect_uri query parameter of the /authorize request takes the value of the URL you intend the user back to once authenticated.
This topic describes the implementation for the React app but looking analogically and taking away SDKs, in your app, you would define the user’s current window location (current URL) and use the value it translates to for the redirect_uri.