Authentication for WPGraphQL using JWT (JSON Web Tokens)
Full Changelog: https://github.com/wp-graphql/wp-graphql-jwt-authentication/compare/v0.4.0...v0.7.0
fix: fixes a bug where all headers were being replaced instead of adding headers. Thanks, and happy anniversary @tsmith-rv.
feat: When the GRAPHQL_JWT_AUTH_SET_COOKIES
constant is set to true, WordPress will set the cookies upon successful authentication with JWT Auth. Thanks @henrikwirth!
Full Changelog: https://github.com/wp-graphql/wp-graphql-jwt-authentication/compare/v0.5.2...v0.6.0
Full Changelog: https://github.com/wp-graphql/wp-graphql-jwt-authentication/compare/v0.5.1...v0.5.2
Full Changelog: https://github.com/wp-graphql/wp-graphql-jwt-authentication/compare/v0.5.0...v0.5.1
Full Changelog: https://github.com/wp-graphql/wp-graphql-jwt-authentication/compare/v0.4.1...v0.5.0
graphql_jwt_auth_expire
has been fixed to take the filtered value and add it to the issue date. So, you can use the filter, return a value of 600
and that will add 600 seconds to the issue date, and your token will expire 10 minutes after issue. If you were using this filter already, and were doing this math yourself, you should update to just return the number of seconds after issue you would like the token to expire.graphql_jwt_auth_expire
filter. Thanks @henrikwirth!GRAPHQL_JWT_AUTH_SECRET_KEY
From a GraphQL Consumer perspective there shouldn't be any breaking changes. The shape of queries and mutations remain the same in this release.
Some internal functions were modified, so for plugins that extend this (i.e. WPGraphQL for WooCommerce) it's best to check your use of internal functions for how changes may affect your code.
If anything, this should fix things that previously broke when updating to WPGraphQL v0.5.0/v0.6.0 support.
id
through with the login resolver to allow added fields to have access to the idregister_graphql_fields
API instead of filtering the WPObjectType directlygraphql_jwt_user_types
filterlogin
mutation to use regsiter_graphql_mutation
so that the mutation payload can be filtered for additional output fields.