Skip to content

Instantly share code, notes, and snippets.

@stupiduglyfool
Last active July 23, 2020 15:25
Show Gist options
  • Save stupiduglyfool/1e6c21209a8c3871fb1a4b8a8cd38e8b to your computer and use it in GitHub Desktop.
Save stupiduglyfool/1e6c21209a8c3871fb1a4b8a8cd38e8b to your computer and use it in GitHub Desktop.
let authRequestExtras = {
code_challenge: this._verifier.challenge,
code_challenge_method: this._verifier.method
}
let authResponse = this.authorizationHandler.performAuthorizationRequest(this.configuration, new AuthorizationRequest(
clientId, redirectUri, scope, AuthorizationRequest.RESPONSE_TYPE_CODE,
undefined /* state */, authRequestExtras));
let tokenRequestExtras = = { code_verifier: this._verifier.verifier };
let tokenResponse = this.authorizationHandler.performTokenRequest(
authConfig,
new TokenRequest(clientId, redirectUri, GRANT_TYPE_AUTHORIZATION_CODE, authResponse.response.code, undefined, tokenRequestExtras));
@twinklekumarp
Copy link

do you have full working example with PKCE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment