Is it possible to let the user set up multiple devices for 2FA using TOTP?
I see that the DB schema has a 1 to many relation to the user, meaning one user can have multiple twoFactors.
Does it mean that a user can have multiple TOTPs set up?
If so, how can I add an other TOTP and how can they be differentiated from one an other?
I can't find anything regarding this in the docs.
3 Replies
bump
what's your use case for having multiple totp's for 1 user?
Well, I also use keycloak a lot and they allow users to have multiple totps. I guess I am just used to having this feature. But also even if it wasn't intended for the user to have multiple totps why are the relations set up this way?
There are pros and cons to having this feature, but I think since we also allow the user to set up multiple passkeys, we could also let them set up multiple totp devices.
One big plus I see is that a user is less likely to be locked out if they lose their devices that they used to set up that totp and for some reason havent saved their backup codes.