When 2FA is enforced and a user has not yet set up any Two-Factor provider, the Login Flow asks the user which they want to enable. I’m working on twofactor_email v3 and have simplified it. If a user has a primary email set, they can just enable it, without verification.
I want to provide some feedback to the user in the AtLogin vue. There (not fully logged in), while enabling the provider ‘enabled’ state, I display the primary email address, so that the user knows which mail account to check. This is what 3.0.3-beta.4 implements.
I managed it using @nextcloud/initial-state. I just wonder whether there is a way to read this user attribute from some JS API without having to provide it on the server side? This would probably weaken 2FA since it reveals information about the user.
So should I remove displaying the primary email address for security reasons?