Is there a way to customize this link?
# ory-network
f
Is there a way to customize this link?
b
Not really, AFAICS, what kind of customization are you looking for?
f
Well, it points to a url that doesn’t exist.
It links to the base url of my custom domain. My app is on another subdomain.
{"error":{"code":404,"status":"Not Found","request":"d8152fdc-98ff-9659-a83d-c10eabf9ea0d","message":"Requested url does not match any rules"}}
b
I think, you should be able to specify a
return_to
when you’re initializing the verification flow. It should be persisted, from the start of the flow to the end.
f
I’m just using the default Managed UI. So when you sign up, you get a “Please verify your email address”. If you click the link in the email and submit the form, you get the page with the screenshot above in this thread. Is there a way to add a
return_to
with the Managed UI?
Oh, I think I see the template
I think that worked.
Maybe not 🤔
I think I need to customize the “Sign Up” link.
r
@bland-eye-99092 Is the
return_to
state supposed to persist from the registration flow when following a verification email sent after registration? I'm encountering the same problem as Brandon, once the verification flow is fetched in the self-service UI, the
return_to
state is lost.
b
The
return_to
is stored in the DB (hence you don’t see it in the URL anymore). But I guess it also doesn’t redirect you to the
return_to
URL after completing the verification flow. Is that correct?
r
Yes
It's also not in the flow object
b
Which strategy are you using?
code
or
link
?
r
link
b
Actually, looking at the code, it doesn’t seem like
return_to
in the registration flow is transferred to the
verification
flow. But for the
link
strategy, the
selfservice.flows.verification.after.default_browser_return_url
should work.
r
Using a default return URL is unfortunately not an option for us, bc we have many different applications using the self-service UI
It's good to know if it's not a bug in our code. Would you have any suggestions for other workarounds?
The only case where we haven't been able to make this work with
after_verification_return_to
is when the sign-up flow is started by trying OIDC login first (see this thread)
b
Ah, I see. Unfortunately, nothing I am aware of. Oh wow. Seems like it should be possible, and maybe there is just some “glue” code missing. Could you create an issue in ory/kratos?
r
Yes, will do 🙂
f
Is there a way to add the
after_verification_return_to
url param to the Managed UI sign up link? I still haven’t figure that out.
r
Only if you build a custom implementation of the self-service UI
f
Ok. Maybe I’ll submit a feature request to be able to set it via the Ory Network UI.
r
@bland-eye-99092 I've opened an issue in ory/kratos on the persistence of the
return_to
from the registration to the verification flow.