File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
e2e_tests/typescript/src/server_clients Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -405,6 +405,7 @@ export class AutomatedOAuthClient extends Server {
405405class AutomatedOAuthClientProvider implements OAuthClientProvider {
406406 private _clientInformation : OAuthClientInformationFull ;
407407 private _tokens ?: OAuthTokens ;
408+ private _codeVerifier ?: string ;
408409
409410 constructor (
410411 private readonly _clientMetadata : OAuthClientMetadata ,
@@ -451,16 +452,13 @@ class AutomatedOAuthClientProvider implements OAuthClientProvider {
451452 }
452453
453454 saveCodeVerifier ( codeVerifier : string ) : void {
454- // Not used in client credentials flow
455- throw new Error (
456- "saveCodeVerifier should not be called in automated OAuth flow"
457- ) ;
455+ this . _codeVerifier = codeVerifier ;
458456 }
459457
460458 codeVerifier ( ) : string {
461- // Not used in client credentials flow
462- throw new Error (
463- "codeVerifier should not be called in automated OAuth flow"
464- ) ;
459+ if ( ! this . _codeVerifier ) {
460+ throw new Error ( "No code verifier saved" ) ;
461+ }
462+ return this . _codeVerifier ;
465463 }
466464}
You can’t perform that action at this time.
0 commit comments