Creates an instance of PKCEOAuthStrategy.
The configuration for the PKCE OAuth 2.0 strategy.
Gets the authentication headers, automatically handling token refresh if needed.
A promise that resolves to the authentication headers.
Handles the redirect from the authorization server. This method should be called on the redirect URI page. It exchanges the authorization code for an access token.
A promise that resolves when the redirect has been handled.
Checks if there is a valid, non-expired token.
A promise that resolves to true if the token is valid, false otherwise.
Initiates the PKCE login flow by redirecting the user to the authorization endpoint.
A promise that resolves when the login process is complete.
Clears the cached token.
Implements the OAuth 2.0 Authorization Code Flow with PKCE (Proof Key for Code Exchange). This is the recommended, most secure method for authenticating users in browser-based applications.