identity: set default mfa method to email for new users

This commit is contained in:
Abdullah Atta
2026-05-08 11:15:51 +05:00
parent ebb1d44edd
commit 28d614d80b
@@ -157,6 +157,7 @@ namespace Streetwriters.Identity.Services
}
else
{
await mfaService.EnableMFAAsync(user, MFAMethods.Email);
if (userAgent != null) await userManager.AddClaimAsync(user, new Claim("platform", PlatformFromUserAgent(userAgent)));
var code = await userManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = UrlExtensions.TokenLink(user.Id.ToString(), code, client.Id, TokenType.CONFRIM_EMAIL);