Skip to content

Commit 59a1469

Browse files
committed
CI-6000: Expose Refresh Token in Authenticated REST API requests
--- This exposes `X-JWT-Refresh` in the repsonse headers of REST API requests that were authenticated with a WPGraphQL issued JWT Auth Token. You can see this in action in the below GIF where I: - Login via GraphQL to get an authToken - Use the authToken as my Authorizaton token in a WP REST API request - See a `X-JWT-Refresh` token in the REST API response headers ![x-jwt-auth-rest-response](https://user-images.githubusercontent.com/1260765/53048992-4bca7480-3453-11e9-8e51-3b6fe59d2b34.gif)
1 parent a220921 commit 59a1469

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/ManageTokens.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,6 @@ public static function add_auth_headers_to_rest_response( \WP_HTTP_Response $res
364364

365365
$refresh_token = Auth::get_refresh_token( new \WP_User( $validate_auth_header->data->user->id ), false );
366366

367-
if ( ! empty( $refresh_token ) && ! is_wp_error( $refresh_token ) ) {
368-
$headers['X-JWT-Refresh'] = $refresh_token;
369-
}
370-
371367
}
372368

373369
if ( $refresh_token ) {

0 commit comments

Comments
 (0)