Problem/Motivation

POST /oauth/token answers 500: "You need to set the OAuth2 private key." Simple OAuth 6.1.4 is installed by the recipe and no key pair is generated or configured; /oauth/jwks is {"keys":[]}. The README promises OAuth 2.0.

Steps to reproduce

  1. Build a site from a recipe that applies modules/contrib/webapi/recipes/default.
  2. Create a consumer with the client_credentials grant.
  3. POST /oauth/token with the client id, secret and a scope: 500.

Proposed resolution

Generate the key pair in private://simple_oauth at install and in an update hook when the site has a private files directory and no keys are configured, and warn on the status report while no readable key pair exists.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • fix: Generate the OAuth 2.0 keys at install

AI-Generated: Yes

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed d2eb8338 on 1.0.x
    fix: #3637719 Generate the OAuth 2.0 keys at install
    
    Simple OAuth...
rajab natshah’s picture

Issue summary: View changes
Status: Active » Fixed

Merged in !4, pipeline 1044388.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

✅ Released webapi 1.0.2