WordPress as a OAuth Provider

Okay, after your comments, I think I see what you’re asking but I’m not sure, so I’ll make it as generic as possible. WordPress uses the authenticate filter hook to perform authentication. You can add additional authentication methods by connecting your own functions to this filter. This is an example of an authentication function. This … Read more

How to build a plugin that supports authenticated POST requests to the REST API from external servers?

Answering my own question. For plugin developers, the directive is to use current_user_can() in your code as usual in the REST endpoints, as Core does. WordPress 5.4 does not support authenticated requests originated from outside WordPress to the REST API yet. But your clients can use plugins such as Basic Auth, OAuth2 or JWT to … Read more

Utilize WordPress Authentication Only

Not sure, but currently in my mind the first solution. Do you need the data from WordPress for the authentication. If you include the wp-load.php you have access to WordPress and his functions, maybe to identifier. But the file to include as static path is not really great and solid. define( ‘WP_USE_THEMES’, FALSE ); require( … Read more