We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 988cb55 + 1c7513d commit 4719877Copy full SHA for 4719877
inc/authentication/namespace.php
@@ -117,6 +117,12 @@ function attempt_authentication( $user = null ) {
117
// Attempt to find the token.
118
$is_querying_token = true;
119
$token = Tokens\get_by_id( $token_value );
120
+ if ( empty( $token ) ) {
121
+ $is_querying_token = false;
122
+ $oauth2_error = create_invalid_token_error( $token_value );
123
+ return $user;
124
+ }
125
+
126
$client = $token->get_client();
127
$is_querying_token = false;
128
0 commit comments