Skip to content

Commit

Permalink
fix: get storeId, fix refresh token error
Browse files Browse the repository at this point in the history
  • Loading branch information
ksavosteev committed Feb 1, 2024
1 parent 8a1d6cb commit 95e0316
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ public async Task<ActionResult> Exchange()
// Validate the username/password parameters and ensure the account is not locked out.
var result = await _signInManager.CheckPasswordSignInAsync(user, openIdConnectRequest.Password, lockoutOnFailure: true);

var storeId = openIdConnectRequest.GetParameter("storeId");
var context = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
{
{ "detailedErrors", _passwordLoginOptions.DetailedErrors },
{ "storeId", openIdConnectRequest.Scope },
{ "storeId", storeId?.Value },
};

foreach (var loginValidation in _userSignInValidators.OrderByDescending(x => x.Priority).ThenBy(x => x.GetType().Name))
Expand Down Expand Up @@ -150,7 +151,7 @@ public async Task<ActionResult> Exchange()
// Create a new authentication ticket, but reuse the properties stored in the
// authorization code/refresh token, including the scopes originally granted.
var ticket = await CreateTicketAsync(openIdConnectRequest, user, info.Properties);
return SignIn(ticket.Principal, ticket.Properties, ticket.AuthenticationScheme);
return SignIn(ticket.Principal, ticket.AuthenticationScheme);
}
else if (openIdConnectRequest.IsClientCredentialsGrantType())
{
Expand Down

0 comments on commit 95e0316

Please sign in to comment.