MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / readCredentialsFile

Function readCredentialsFile

src/lib/login-authenticator.ts:75–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 mkdirSync(cliDir, { recursive: true })
74
75 const readCredentialsFile = (): CredentialsFileData => {
76 try {
77 return JSON.parse(readFileSync(credentialsFile).toString())
78 } catch (err) {
79 if (err.code !== 'ENOENT') { throw err }
80 }
81
82 return {}
83 }
84
85 const clientId = clientIdProvider.clientId
86 const credentialsFileData = readCredentialsFile()

Callers 3

loginAuthenticatorFunction · 0.85
updateTokenFromResponseFunction · 0.85
logoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected