A lot of good questions here, and I have one as we...
# talk-kratos
s
A lot of good questions here, and I have one as well haha. We have developed a tool for municipalities to see data about their municipality plotted on a map. Some of that data is restricted. Now we want to use separate pages for altering
settings
. After recovering your password using the
code
recovery flow, you're redirected to the settings page. What is the recommended way to change this page? Thanks!
m
Hello @stale-queen-97584 You can read more about how to customize the UI here: https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration
I guess you want a post-recovery redirect to /settings and a custom page for settings?
s
Hi @magnificent-energy-493 Just the other way around. We want a custom password-recovery page, that is used only after recovering your account. For our application this seems like a cleaner use-case than sending the user to their general settings page Thanks for the link. Will dive in that tomorrow
m
I see @stale-queen-97584, In that case you want a “post-recovery redirect”. In Ory Network you can configure that here https://console.ory.sh/projects/current/browser-redirects or via CLI. For selfhosted you just add it to the config directly.
s
@magnificent-energy-493 ha, thanks! We're indeed currently using a selfhosted. Can you give a hint of where this would be added in the config?
I have found there are options, but a "post code recovery" is not one of them, is that correct?
I might have found something in config overview: https://www.ory.sh/docs/kratos/reference/configuration
Hm.
Copy code
default_browser_return_url
Isn't working as expected. After using the recovery flow and filling in an account recovery code, it has a default_browser_return_url that always returns to the
settings
page. This seems hardcoded into Ory. Is that possible Vincent?
m
Hey @stale-queen-97584 I looked into it a bit more and recovery is considered “finished” once the user sets a new password. Then they get redirected to the recovery URL. You get a message like this in the UI: > You successfully recovered your account. Please change your password or set up an alternative login method (e.g. social sign in) within the next 14.99 minutes. Once the user does that they get redirect to the return url. Basically recovery is considered “finished” once the password is changed/other OIDC signin is setup
s
Hey Vincent, thanks for baring with me! Your help is appreciated. It feels a bit odd to program a somewhat custom flow, when the API is designed to support a different/opinionated flow. For now, we will program around it! 🙂