Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An option to require PKCE parameters #179

Open
Assignees
Labels
compliance 📜OAuth 2.0 standard compliance documentation 📑Improvements or additions to documentation security ❗Address a security issue
@saschanaz

Description

It seems it's fully optional right now:

// optional: PKCE code challenge
if (code.codeChallenge) {
if (!request.body.code_verifier) {
throw new InvalidGrantError('Missing parameter: `code_verifier`');
}
const hash = pkce.getHashForCodeChallenge({
method: code.codeChallengeMethod,
verifier: request.body.code_verifier
});
if (!hash) {
// notice that we assume that codeChallengeMethod is already
// checked at an earlier stage when being read from
// request.body.code_challenge_method
throw new ServerError('Server error: `getAuthorizationCode()` did not return a valid `codeChallengeMethod` property');
}
if (code.codeChallenge !== hash) {
throw new InvalidGrantError('Invalid grant: code verifier is invalid');
}
}

Could be great if there's an option to force it. Of course one can block the request manually by checking the query, though.

Metadata

Metadata

Labels

compliance 📜OAuth 2.0 standard compliance documentation 📑Improvements or additions to documentation security ❗Address a security issue

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /