The purpose of this project is to show how to connect an OAuth client to the OAuth server in the Yoast SEO plugin. The OAuth server in the Yoast SEO plugin is on a development branch. This client is build with VueJS and TypeScript and uses the PKCE extention for OAuth 2.0.
- Install the Yarn package manager
- Clone this repository
- Use
yarn install
to install the required packages - Use
yarn serve
to serve the test server - Note that you might need to setup a
.env
file in the root of the cloned repository. The.env
file will need to look something like the following (for local development):
VUE_APP_API_BASE_URI=http://basic.wordpress.test
VUE_APP_API_AUTHORIZATION_ENDPOINT=/wp-admin/admin.php?page=wpseo_oauth_authorize
VUE_APP_API_ACCESS_TOKEN_ENDPOINT=/wp-json/yoast/v1/oauth/access-token
VUE_APP_API_ENDPOINT=/wp-json/yoast/v1/
VUE_APP_API_OAUTH_CLIENT_ID=test-client-identifier
VUE_APP_API_OAUTH_REDIRECT_URI=http://localhost:8080/auth/callback
Additionally, a Yoast development environment should be set up with the correct development branch (including the OAuth server).