Hey everyone, I'm currently investigating Ory as ...
# general
e
Hey everyone, I'm currently investigating Ory as an authentication solution for our project, and I haven't found information on how to implement some of the flows. 1. How can I request a user to verify their email before changing it? 2. Is it possible to ask the user to enter their old password when setting a new one? If you have experience working with this, could you please share it with me? Thank you!
b
i think the flow in the diagram here covers what you're asking: https://www.ory.sh/docs/kratos/self-service/flows/user-settings
🙌 1
e
Thank you so much, it helped me to set up the password flow. But I still have a problem with changing email. After you log in to the system, you have permission to change the email. However, if you do so and then log out, you won't be able to log in again. (This issue occurs if the user enters an incorrect email address and you only require verified email addresses to log in) Have you ever solved this problem at some point?
b
I have not run into that issue yet
its an interesting one
e
Maybe I missed something, but it seems like there's an issue on the Ory side. I've recorded a short video that shows this problem. (In case I want to allow users to log in only with verified emails, this could pose a problem)
b
hmm, yeah so its a privileged session (recently got a fresh session, i.e. not timed out),, so it can change email address which is an identifier at will without refreshing token.. same as my app. I'm self hosted. the main problem is that it changed without a verification required....
if you check the network tab on chrome do you see in the response from updating the settings flow? does it have
continue_with
on the flow?
i mean, that is Ory's own UI there, so it should be dealing with it
may be fixable with a hook
Believe I found a discussion about this exact issue: https://github.com/ory/kratos/discussions/2501
sounds like it is indeed a known issue
e
Oh, thanks for your input. I didn't see these GitHub issues yet. I think it will be easier to just disable the ability to change email for user at this point 🙂
b
exactly my thoughts 😄
😄 1
not entirely sure how I'd do that,, it it ideally needs to be on the ory backend side of things... even if I remove the email field from the UI ory will complain the email is not in the update settings body because its a required field on the submission body...
I'll have a play tomorrow
let me know if you come up with anything, as I'll run into the exact same problem soon
🤝 1
e
Okay, I will notify you if I find anything
gratitude thank you 1