Adds WPGraphQL JWT Auth fields to Customer type and mutations #148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request
Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.
🚨Please review the guidelines for contributing to this repository.
What does this implement/fix? Explain your changes.
This implements some fields, if WPGraphQL-JWT-Authentication is installed and activated.
Changes
registerCustomer
andupdateCustomer
output.authToken
JWT Token that can be used in future requests for AuthenticationrefreshToken
A JWT token that can be used in future requests to get a refreshed jwtAuthTokenCustomer
typejwtAuthToken
A JWT token that can be used in future requests for authentication/authorizationjwtRefreshToken
A JWT token that can be used in future requests to get a refreshed jwtAuthToken. If the refresh token used in a request is revoked or otherwise invalid, a valid Auth token will NOT be issued in the response headers.jwtUserSecret
A unique secret tied to the users JWT token that can be revoked or refreshed. Revoking the secret prevents JWT tokens from being issued to the user. Refreshing the token invalidates previously issued tokens, but allows new tokens to be issued.jwtAuthExpiration
The expiration for the JWT Token for the user. If not set custom for the user, it will use the default sitewide expiration setting. (Broken due to Type hinting bug in WPGraphQL-JWT-Authentication) See thisisJwtAuthSecretRevoked
Whether the JWT User secret has been revoked. If the secret has been revoked, auth tokens will not be issued until an admin, or user with proper capabilities re-issues a secret for the user. (Broken due to Type hinting bug in WPGraphQL-JWT-Authentication) See thisDoes this close any currently open issues?
…
Any relevant logs, error output, GraphiQL screenshots, etc?
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
Any other comments?
Where has this been tested?
Operating System: Ubuntu 18.04
WordPress Version: 5.2.3