https://www.ory.sh/ logo
j

jolly-tiger-57705

04/12/2022, 5:44 PM
Settings flow is used for modifying Profile and setting new password after the recovery link is clicked. Is there a way to differentiate between those two cases? Right now my app wrongly shows the Profile page
m

magnificent-energy-493

04/12/2022, 6:34 PM
for selfhosted kratos in the configuration for the settings flow settings flow you have an return url for each of those cases
Copy code
after:
        password:         
          default_browser_return_url: <https://my-app.com/dashboard>

        profile:
          default_browser_return_url: <https://my-app.com/dashboard>
in ory cloud you can also configure this in the browser redirects screen
j

jolly-tiger-57705

04/13/2022, 6:24 AM
I think it's a different case
User clicks recovery link -> Kratos redirects to settings page.
Is there any way to change this redirection URL?
j

jolly-tiger-57705

04/13/2022, 10:18 AM
Thanks! This partially solves the issue.
It is still problematic to have two UI under one
/settings
URL. One for password reset the other for profile edition.
s

steep-lamp-91158

04/13/2022, 10:20 AM
Can't you conditionally not show the other fields?
j

jolly-tiger-57705

04/13/2022, 10:21 AM
I can, it's just problematic. It's a next.js application with different layouts used when user is logged in and is just editing his profile and when user is putting a new reset password
It would be easier if this could be set under
recovery
as a separate ui_url in the after hook, or something like that
s

steep-lamp-91158

04/13/2022, 11:32 AM
feel free to open an issue to continue the discussion there
1