AxeWP / wp-graphql-headless-login

A WordPress plugin that provides Headless login and authentication for WPGraphQL, supporting traditional passwords, OAuth2/OpenID Connect, JWT, and more.
GNU General Public License v3.0
72 stars 11 forks source link

dev: add new `actions/filters to Client class #88

Closed justlevine closed 1 year ago

justlevine commented 1 year ago

What

This PR adds the following Actions/Filters to the plugin:

Additionally: this PR fixes an issue with graphql_login_after_successful_login, where the WP_User was being passed twice, instead of the user data from the provider. Props @martinowren in #83

Why

These actions/filters will let you you modify a Provider's auth behavior without requiring you to create a custom ProviderConfig class, lowering the barrier to entry and making it easier to use the Generic Oauth2 Client (and future generic types 🤫 ).

Inspired by @martinowren over on Slack 🙏

How

Testing Instructions

Additional Info

Supersedes #83

Checklist:

coveralls commented 1 year ago

Coverage Status

coverage: 83.896% (+0.1%) from 83.799% when pulling 6308990af41ea0df686b99e48311a4a564d31047 on justlevine:dev/client-actions-and-filters into 28a298303b23c0c64b4cf84bd0a16a4d78c8f0d4 on AxeWP:develop.