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 {
405
405
class AutomatedOAuthClientProvider implements OAuthClientProvider {
406
406
private _clientInformation : OAuthClientInformationFull ;
407
407
private _tokens ?: OAuthTokens ;
408
+ private _codeVerifier ?: string ;
408
409
409
410
constructor (
410
411
private readonly _clientMetadata : OAuthClientMetadata ,
@@ -451,16 +452,13 @@ class AutomatedOAuthClientProvider implements OAuthClientProvider {
451
452
}
452
453
453
454
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 ;
458
456
}
459
457
460
458
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 ;
465
463
}
466
464
}
You can’t perform that action at this time.
0 commit comments