Skip to content

Commit 6d91453

Browse files
RachanaRachana
authored andcommitted
BUG#AC-9337:Revoking or invalidating previous access tokens upon generating new access token
1 parent 35e6249 commit 6d91453

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/code/Magento/Integration/Model/CustomerTokenService.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public function createCustomerAccessToken($username, $password)
5858
$this->getRequestThrottler()->throttle($username, RequestThrottler::USER_TYPE_CUSTOMER);
5959
try {
6060
$customerDataObject = $this->accountManagement->authenticate($username, $password);
61-
$this->revokeCustomerAccessToken($customerDataObject->getId());
6261
} catch (EmailNotConfirmedException $exception) {
6362
$this->getRequestThrottler()->logAuthenticationFailure($username, RequestThrottler::USER_TYPE_CUSTOMER);
6463
throw $exception;
@@ -78,7 +77,7 @@ public function createCustomerAccessToken($username, $password)
7877
CustomUserContext::USER_TYPE_CUSTOMER
7978
);
8079
$params = $this->tokenManager->createUserTokenParameters();
81-
80+
$this->revokeCustomerAccessToken($customerDataObject->getId());
8281
return $this->tokenManager->create($context, $params);
8382
}
8483

0 commit comments

Comments
 (0)