1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

passwordless signin for billing portal

This commit is contained in:
Kyle Spearrin
2018-03-20 15:00:56 -04:00
parent 9ed1ae9567
commit 3d9d193bda
16 changed files with 486 additions and 7 deletions

View File

@ -6,6 +6,7 @@ using Newtonsoft.Json;
using System.Linq;
using Bit.Core.Services;
using Bit.Core.Exceptions;
using Microsoft.AspNetCore.Identity;
namespace Bit.Core.Models.Table
{
@ -163,5 +164,20 @@ namespace Bit.Core.Models.Table
return paymentService;
}
public IdentityUser ToIdentityUser()
{
return new IdentityUser
{
Id = Id.ToString(),
Email = Email,
NormalizedEmail = Email,
EmailConfirmed = EmailVerified,
UserName = Email,
NormalizedUserName = Email,
TwoFactorEnabled = TwoFactorIsEnabled(),
SecurityStamp = SecurityStamp
};
}
}
}