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:
parent
739b2cfe34
commit
4b3abe6fb0
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user