fix: #3637719 Generate the OAuth 2.0 keys at install

Issue: https://www.drupal.org/node/3637719

Simple OAuth cannot sign a token without a key pair, and POST /oauth/token answered 500 "You need to set the OAuth2 private key." The install and a new update hook generate the keys in private://simple_oauth with the Simple OAuth key generator when the site has a private files directory and no keys are configured, and the status report warns while no readable key pair exists.

Proof: on a Webships 3.0.x site, after drush updb, POST /oauth/token returns 200 with a token and /oauth/jwks lists a key.

AI-Generated: Yes

Checkpoints

  • File an issue
  • Fix bugs in code
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release Notes
  • Release

Merge request reports

Loading
Loading