1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00

stopped manually encoding the SSO user_identifier (#913)

This commit is contained in:
Addison Beck 2020-09-04 14:16:49 -04:00 committed by GitHub
parent 739b2cfe34
commit 4b3abe6fb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -374,8 +374,6 @@ namespace Bit.Sso.Controllers
}
else
{
var bytes = System.Convert.FromBase64String(userIdentifier);
userIdentifier = System.Text.Encoding.UTF8.GetString(bytes);
var split = userIdentifier.Split(",");
if (split.Length < 2)
{

View File

@ -731,8 +731,7 @@ namespace Bit.Api.Controllers
{
var user = await _userService.GetUserByPrincipalAsync(User);
var token = await _userService.GenerateSignInTokenAsync(user, TokenPurposes.LinkSso);
var bytes = Encoding.UTF8.GetBytes($"{user.Id},{token}");
var userIdentifier = Convert.ToBase64String(bytes);
var userIdentifier = $"{user.Id},{token}";
return userIdentifier;
}
}