1
0
mirror of https://github.com/bitwarden/server synced 2025-12-18 17:23:28 +00:00

Added device identifier, APIs for updating token by identifier, Device creation/update upon signin.

This commit is contained in:
Kyle Spearrin
2016-06-21 00:08:22 -04:00
parent 8a34692e7c
commit 37ec1de7a3
12 changed files with 109 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ namespace Bit.Api.Controllers
[AllowAnonymous]
public async Task<AuthTokenResponseModel> PostToken([FromBody]AuthTokenRequestModel model)
{
var result = await _signInManager.PasswordSignInAsync(model.Email.ToLower(), model.MasterPasswordHash);
var result = await _signInManager.PasswordSignInAsync(model.Email.ToLower(), model.MasterPasswordHash, model.Device?.ToDevice());
if(result == JwtBearerSignInResult.Success)
{
return new AuthTokenResponseModel(result.Token, result.User);