Skip to content

Commit

Permalink
Revoke token when refreshing token fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Nov 12, 2019
1 parent be8113c commit 8c10dec
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions includes/Core/Authentication/Clients/OAuth_Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,7 @@ public function refresh_token() {
$error_code = $e->getMessage();
}
// Revoke and delete user connection data if the refresh token is invalid or expired.
if ( 'invalid_grant' === $error_code ) {
$this->revoke_token();
}
$this->revoke_token();
$this->user_options->set( self::OPTION_ERROR_CODE, $error_code );
return;
}
Expand Down

0 comments on commit 8c10dec

Please sign in to comment.