Closed Ulthran closed 3 weeks ago
I think the best way would be to store the state value in the session, from the docs:
# An optional "state" value can be set in the current session which will
# be passed and then used in the postlogin route (after the user has logged
# into the Cognito hosted UI); this could be used for dynamic redirects,
# for example, set `session['state'] = "some_custom_value"` before passing
# the user to this route
If you navigate to a route marked with
@authrequired
, after successful login it will redirect according to whatever is in thepostlogin
route. How do you set this dynamically based on the original route?