MCPcopy Create free account
hub / github.com/vercel/vercel / clearAllCredentialsStrict

Function clearAllCredentialsStrict

packages/cli-auth/credentials-store.ts:566–594  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

564}
565
566export function clearAllCredentialsStrict(dir: string) {
567 const configPath = cliConfig.getAuthConfigFilePath(dir);
568 const runtimeFlags = readRuntimeFlags();
569
570 let fileError: unknown;
571 let keyringError: unknown;
572
573 try {
574 deleteCredentialsFile(configPath);
575 } catch (error) {
576 fileError = error;
577 }
578
579 try {
580 deleteCredentialsFromKeyring(configPath, runtimeFlags);
581 } catch (error) {
582 if (!isKeyringUnavailableError(error)) {
583 keyringError = error;
584 }
585 }
586
587 if (keyringError) {
588 throw keyringError;
589 }
590
591 if (fileError) {
592 throw fileError;
593 }
594}

Callers 2

persistCliAuthConfigFunction · 0.85

Calls 4

readRuntimeFlagsFunction · 0.85
deleteCredentialsFileFunction · 0.85

Tested by

no test coverage detected