Correct OAuth2 key generation and token revocation in v7 docs - #162
Merged
Conversation
Keys are generated by php ./bin/generate-oauth2-keys.php, which skips when all three files in data/oauth exist, so updates no longer invalidate issued tokens (7.2.0, issue #503). UserService::revokeTokens() is private; document the repository methods instead. Adds a key rotation FAQ. Signed-off-by: arhimede <julian@dotkernel.com>
alexmerlin
reviewed
Sep 5, 2026
Comment on lines
+39
to
+40
| Dotkernel API runs its own `php ./bin/generate-oauth2-keys.php` script to create the public/private | ||
| key pair and the encryption key used to sign and verify the transmitted JWTs. |
Comment on lines
+51
to
+55
| **Existing keys are never overwritten.** The script checks for `data/oauth/encryption.key`, | ||
| `data/oauth/private.key` and `data/oauth/public.key`; if all three are present it prints | ||
| `OAuth2 keys already exist. Skipping...` and stops. | ||
| Only when one is missing does it delegate to | ||
| `vendor/mezzio/mezzio-authentication-oauth2/bin/generate-oauth2-keys` to generate the set. |
Member
There was a problem hiding this comment.
Some sentence splitting happening here as well...
Comment on lines
+25
to
+33
| > If your application requires it, you can revoke a user's OAuth tokens before they expire. | ||
| > `UserService::revokeTokens()` is `private`, so it cannot be called from your own code; it runs as | ||
| > part of the public `UserService::deleteUser()`, which revokes the tokens and then anonymizes the | ||
| > account. | ||
| > | ||
| > To revoke tokens on their own, use the token repositories directly: fetch the user's tokens with | ||
| > `OAuthAccessTokenRepository::findAccessTokens($identity)`, then pass each token to | ||
| > `OAuthAccessTokenRepository::revokeAccessToken()` and | ||
| > `OAuthRefreshTokenRepository::revokeRefreshToken()`. |
Member
There was a problem hiding this comment.
Sentence splitting, even though it's disguised in a quote (because it starts with > ).
Unwraps six sentences that were split across lines. No wording changes. Signed-off-by: arhimede <julian@dotkernel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keys are generated by php ./bin/generate-oauth2-keys.php, which skips when all three files in data/oauth exist, so updates no longer invalidate issued tokens (7.2.0, issue #503). UserService::revokeTokens() is private; document the repository methods instead. Adds a key rotation FAQ.