mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +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
|
else
|
||||||
{
|
{
|
||||||
var bytes = System.Convert.FromBase64String(userIdentifier);
|
|
||||||
userIdentifier = System.Text.Encoding.UTF8.GetString(bytes);
|
|
||||||
var split = userIdentifier.Split(",");
|
var split = userIdentifier.Split(",");
|
||||||
if (split.Length < 2)
|
if (split.Length < 2)
|
||||||
{
|
{
|
||||||
|
@ -731,8 +731,7 @@ namespace Bit.Api.Controllers
|
|||||||
{
|
{
|
||||||
var user = await _userService.GetUserByPrincipalAsync(User);
|
var user = await _userService.GetUserByPrincipalAsync(User);
|
||||||
var token = await _userService.GenerateSignInTokenAsync(user, TokenPurposes.LinkSso);
|
var token = await _userService.GenerateSignInTokenAsync(user, TokenPurposes.LinkSso);
|
||||||
var bytes = Encoding.UTF8.GetBytes($"{user.Id},{token}");
|
var userIdentifier = $"{user.Id},{token}";
|
||||||
var userIdentifier = Convert.ToBase64String(bytes);
|
|
||||||
return userIdentifier;
|
return userIdentifier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user