WP-API: how do I allow authenticated clients only?

This is how I did it, but I feel it could be better. For one thing, this results in HTTP 500… 403 would be preferable add_filter( ‘json_authentication_errors’, function( $authenticated ) { if( !$authenticated ) { return new WP_Error(‘Access Denied’); } }, 99 ); (I understand this’ll work for Basic Auth too)

Implement authentication to an organization oAuth server

Using JWT you can extends the WP REST API using JSON Web Tokens Authentication as an authentication method. WordPress REST API Authentication: Default cookie authentication : cookie authentication is the only authentication mechanism available natively within WordPress. Remote applications : To support remote applications, we need to add a new REST API authentication method using … Read more

Discord OAuth2 redirect URI how-to

You need to have your own webserver with some path to make your redirect url. For example, if you owned example.com, you could have example.com/discord be the url to redirect the client to after they login via Discord.

What is the OAuth 2.0 Bearer Token exactly?

Bearer TokenA security token with the property that any party in possession of the token (a “bearer”) can use the token in any way that any other party in possession of it can. Using a bearer token does not require a bearer to prove possession of cryptographic key material (proof-of-possession). The Bearer Token is created … Read more