(creds: UserCredentials)
| 471 | |
| 472 | // recordCredentials saves credentials to configstore to be used in future command runs. |
| 473 | export function recordCredentials(creds: UserCredentials) { |
| 474 | configstore.set("user", creds.user); |
| 475 | configstore.set("tokens", creds.tokens); |
| 476 | // store login scopes in case mandatory scopes grow over time |
| 477 | configstore.set("loginScopes", creds.scopes); |
| 478 | // remove old session token, if it exists |
| 479 | configstore.delete("session"); |
| 480 | } |
| 481 | |
| 482 | async function loginRemotely(): Promise<UserCredentials> { |
| 483 | const authProxyClient = new apiv2.Client({ |
no test coverage detected
searching dependent graphs…