Skip to content

Commit

Permalink
identity: auto enable 2fa by email on self hosted instance
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Aug 1, 2024
1 parent 2f5bd75 commit ad590f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Streetwriters.Identity/Controllers/SignupController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ You should have received a copy of the Affero GNU General Public License
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Streetwriters.Common;
using Streetwriters.Common.Enums;
using Streetwriters.Common.Models;
using Streetwriters.Identity.Enums;
using Streetwriters.Identity.Interfaces;
Expand Down Expand Up @@ -105,6 +106,7 @@ public async Task<IActionResult> Signup([FromForm] SignupForm form)
if (Constants.IS_SELF_HOSTED)
{
await UserManager.AddClaimAsync(user, UserService.SubscriptionTypeToClaim(client.Id, Common.Enums.SubscriptionType.PREMIUM));
await MFAService.EnableMFAAsync(user, MFAMethods.Email);
}
else
{
Expand Down

0 comments on commit ad590f6

Please sign in to comment.