Skip to content

Commit 95e0316

Browse files
committed
fix: get storeId, fix refresh token error
1 parent 8a1d6cb commit 95e0316

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ public async Task<ActionResult> Exchange()
100100
// Validate the username/password parameters and ensure the account is not locked out.
101101
var result = await _signInManager.CheckPasswordSignInAsync(user, openIdConnectRequest.Password, lockoutOnFailure: true);
102102

103+
var storeId = openIdConnectRequest.GetParameter("storeId");
103104
var context = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
104105
{
105106
{ "detailedErrors", _passwordLoginOptions.DetailedErrors },
106-
{ "storeId", openIdConnectRequest.Scope },
107+
{ "storeId", storeId?.Value },
107108
};
108109

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

0 commit comments

Comments
 (0)