[oidc-provider] Add BaseToken#generateTokenId#75183
Open
RoyLeibo wants to merge 4 commits into
Open
Conversation
Contributor
|
@RoyLeibo Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 75183,
"author": "RoyLeibo",
"headCommitOid": "828b05581700722e2907f6f6c4d8ab739636c209",
"mergeBaseOid": "e186cd854fef1fbd5152877e78f9ab05743c226e",
"lastPushDate": "2026-06-30T11:06:25.000Z",
"lastActivityDate": "2026-06-30T11:06:25.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "oidc-provider",
"kind": "edit",
"files": [
{
"path": "types/oidc-provider/index.d.ts",
"kind": "definition"
},
{
"path": "types/oidc-provider/oidc-provider-tests.ts",
"kind": "test"
}
],
"owners": [
"panva"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [],
"mainBotCommentID": 4842714100,
"ciResult": "pass"
} |
Contributor
|
🔔 @panva — please review this PR in the next few days. Be sure to explicitly select |
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.
BaseToken#generateTokenIdAdds the missing
generateTokenId(): stringmethod toBaseToken.It exists at runtime on every token model but is absent from the typings, so calling it (e.g. to mint an opaque token value without persisting it via the adapter) currently requires an
as unknown as { generateTokenId(): string }cast.Runtime evidence (
oidc-provider@9.8.6, also present in 7.x):lib/models/formats/opaque.js(generateTokenId() { … return nanoid(length); }) and thejwt/paseto/dynamicformats.lib/models/mixins/has_format.js(klass.prototype.generateTokenId = generateTokenId;).save()(this.jti = this.generateTokenId();).Since the format mixin is applied to all
BaseTokendescendants, declaring the method onBaseToken(alongsidejti/save) matches the runtime surface.A line exercising the method was added to the existing
access_token.savedhandler inoidc-provider-tests.ts.Select one
If changing an existing definition