Getting the value of the redirect query parameter is challenging. You’ll need to update the /devices/{deviceId}
endpoint configuration.
The full template is:
/login?redirect={{encodeURIComponent request.path}}%3F{{encodeURIComponent (queryStringEncode request.query)}}
Then in the login workflow, you’ll have the parameter available:
The login workflow has a node labeled “Redirect to /”. You’ll need to modify that to instead redirect to {{data.query.redirect}}
.