Hello everyone!
I'm having trouble using phone numbers as a second factor for users.
Desired behavior:
Initially, users can log in without a second factor. However, they should have the option to enable it. Once enabled, the system should require the user to pass the second factor before logging in.
Actual behavior:
Users log in to the system, link their phone number as a second factor, but for some reason, Ory still allows them to authenticate without the second factor.
Here are the steps I use to link the second factor:
1. Use the login endpoint (
playground link).
2. Use the settings endpoint to set the phone number (
playground link).
3. Use the login endpoint with these parameters to link the second factor: all=all2, via=phone (
playground link).
Here is the playground link:
https://charming-galois-ftrmkz6elw.projects.oryapis.com/ui/welcome
If anyone has experience setting this up, could you please share it with me? I'm sure I'm doing something wrong, but I can't figure out what. (I already asked this
question, but we decided to skip this flow in the project.)
Thank you!