thanks for the quick response! I thought i remembered seeing something like that somewhere but I couldn't find it
actually I think I still have an issue... so when my hydra app drops my user into the kratos/self-service login, a user can click the register button, but I can't pass the return /post-verification redirect url into the new flow
11/12/2021, 8:59 AM
Could you maybe explain the flows in a bit more details and where the problem is?
just add the return_to on the initialise of register when the user clicks register in your application.
User is redirected from OAuth app to your Kratos Login page:
OAuth Login -> Kratos Login init (with return_to set). -> Your UI with a new flowId
User Clicks Register on your UI -> Kratos Register Init (Add the return_to here). -> Your Register UI
You can get the return_to url i believe from the flow_id in your UI from the Login flow. You can then automatically append this to the URL on your register button on your UI.
11/12/2021, 5:17 PM
so my hydra Client is redirecting the user to the kratos self service app ("/self-service/login/browser") with the return to set which is to the OAuth page, but when kratos redirects back to my app the return_to on the flow is null
the request_url does have the returnTo I need so I have stripped that out and appended it to my other links as you said, but I'm still wondering if kratos should be giving that back as the returnTo parameter.
it only seems to be when hydra is involved, curiously, if I use my kratos login ui url as the hydra redirect, then everything works as intended, but then my user has to login every time, I'm probably doing something wrong somewhere though...?