Secure WordPress REST API with the "WP REST API Auth0" plugin

GitHub - joshcanhelp/wp-rest-api-auth0: Authorize WP REST API calls with access tokens from Auth0

  1. 1. Click on Code

    Click on Code
  2. 2. Click on Download ZIP

    Click on Download ZIP

WordPress > Plugins

  1. 3. Click on Add New

    Click on Add New
  2. 4. Click on Upload Plugin

    Click on Upload Plugin
  3. 5. Click on install-plugin-submit

    Click on install-plugin-submit
  4. 6. Click on Activate Plugin

    Click on Activate Plugin

Auth0

  1. 7. Click on APIs

    Click on APIs
  2. 8. Click on Create API

    Click on Create API
  3. 9. Type "WP-REST-API sl-out"

    Type "WP-REST-API sl-out"
  4. 10. Click on Identifier *

    Click on Identifier *
  5. 11. Paste input

    Paste input
  6. 12. Select HS256 from Signing Algorithm *

    Select HS256 from Signing Algorithm *
  7. 13. Click on Create

    Click on Create
  8. 14. Click on Settings

    Click on Settings
  9. 15. Click on Copy

    Click on Copy
  10. 16. Click on Machine To Machine Applications

    Click on Machine To Machine Applications
  11. 17. Check Authorized

    Check Authorized
  12. 18. Uncheck Unauthorized

    Uncheck Unauthorized
  13. 19. Click on Applications

    Click on Applications
  14. 20. Click on WP-REST-API sl-out (Test Application)

    Click on WP-REST-API sl-out (Test Application)
  15. 21. Click on Delete

    Click on Delete
  16. 22. Click on dialog

    Click on dialog
  17. 23. Type the application name

    Type the application name
  18. 24. Click on Delete

    Click on Delete
  19. 25. Click on Share-Logins-OUT

    Click on Share-Logins-OUT
  20. 26. Click on Copy

    Click on Copy
  21. 27. Click on Advanced Settings

    Click on Advanced Settings
  22. 28. Click on Grant Types

    Click on Grant Types
  23. 29. Check Password

    Check Password
  24. 30. Click on Save Changes

    Click on Save Changes

cPanel - Espace Technique

  1. 31. Click on File Manager

    Click on File Manager
  2. 32. Go to ~/wp-content/plugins/wp-rest-api-auth0-main/src and comment lines 108 to 118 of the "wp-rest-api-auth0.php" file

    Go to ~/wp-content/plugins/wp-rest-api-auth0-main/src and comment lines 108 to 118 of the "wp-rest-api-auth0.php" file
  3. 33. Paste text area

    Paste text area
  4. 34. Click on Save Changes

    Click on Save Changes
  5. 35. Go to ~/wp-content/plugins/wp-rest-api-auth0-main/src and comment lines 108 to 118 of the "wp-rest-api-auth0.php" file

    Go to ~/wp-content/plugins/wp-rest-api-auth0-main/src and comment lines 108 to 118 of the "wp-rest-api-auth0.php" file
  6. 36. Click on Save Changes

    Click on Save Changes

Postman

  1. 37. Click on Body

    Click on Body
  2. 38. In the "Body" menu, choose RAW > JSON

    In the "Body" menu, choose RAW > JSON
  3. 39. Customize and paste the JSON

    Customize and paste the JSON
  4. 40. Click on base-button

    Click on base-button
  5. 41. Copy the "access_token"

    Copy the "access_token"
  6. 42. Create a new request

    Create a new request
  7. 43. Click on Authorization, Fill in the Bearer token

    Click on Authorization, Fill in the Bearer token
  8. 44. Attempting to post an article via WP REST API

    Attempting to post an article via WP REST API