You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnew \WP_Error( 'graphql-jwt-no-permissions', __( 'Only the user requesting a token can get a token issued for them', 'wp-graphql-jwt-authentication' ) );
134
134
}
135
135
@@ -213,10 +213,10 @@ public static function get_user_jwt_secret( $user_id ) {
if ( ! $is_current_user|| ! current_user_can( $capability ) ) {
220
220
returnnew \WP_Error( 'graphql-jwt-improper-capabilities', __( 'The JWT Auth secret for this user cannot be returned', 'wp-graphql-jwt-authentication' ) );
221
221
}
222
222
@@ -422,7 +422,7 @@ public static function revoke_user_secret( int $user_id ) {
422
422
0 !== get_user_by( 'id', $user_id )->ID &&
423
423
(
424
424
current_user_can( $capability ) ||
425
-
$user_id === wp_get_current_user()->ID
425
+
$user_id === get_current_user_id()
426
426
)
427
427
) {
428
428
@@ -625,10 +625,10 @@ public static function get_refresh_header() {
625
625
/**
626
626
* Check to see if the incoming request has a "Refresh-Authorization" header
0 commit comments