Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.
This repository was archived by the owner on Mar 3, 2022. It is now read-only.

Add usePkce flag to allow authorization_code flow without PKCE #1360

Open
@NickH-nz

Description

@NickH-nz

I ran into an issue recently with an Authorization Server that supports integrations with the OAuth2.0 authorization_code flow both with and without PKCE (with no upgrade path for enabling PKCE on old integrations).

You could argue that it's a bug with the Auth Server not being correctly backwards compaptible, (clients SHOULD include PKCE parameters regardless of server support, as per https://tools.ietf.org/html/rfc7636#section-5).
But there is still a potential fix in this library by allowing to explicitly opt out of PKCE. The issue arises when an integration is set up without PKCE, but the client sends the code_challenge and code_challenge_method parameters along with the auth request. This is interpretted by the server as trying to connect incorrectly and returns with "invalid_grant".

The oidc-client-js library always includes the code_challenge and code_challenge_method parameters. This feature request is to add a flag to support opting out of the clause as the "SHOULD" in the spec allows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions