diff --git a/.changeset/famous-lamps-yawn.md b/.changeset/famous-lamps-yawn.md new file mode 100644 index 000000000..8643487e5 --- /dev/null +++ b/.changeset/famous-lamps-yawn.md @@ -0,0 +1,5 @@ +--- +"@e2b/cli": patch +--- + +Fix login command diff --git a/packages/cli/src/commands/auth/login.ts b/packages/cli/src/commands/auth/login.ts index 7b7191e4a..6efa1bd01 100644 --- a/packages/cli/src/commands/auth/login.ts +++ b/packages/cli/src/commands/auth/login.ts @@ -9,7 +9,7 @@ import * as e2b from 'e2b' import { pkg } from 'src' import { DOCS_BASE, getUserConfig, USER_CONFIG_PATH, UserConfig } from 'src/user' import { asBold, asFormattedConfig, asFormattedError } from 'src/utils/format' -import { client, ensureAccessToken } from 'src/api' +import { client } from 'src/api' const getTeams = e2b.withAccessToken(client.api.path('/teams').method('get').create()) @@ -35,7 +35,7 @@ export const loginCommand = new commander.Command('login') return } - const accessToken = ensureAccessToken() + const accessToken = userConfig.accessToken const res = await getTeams(accessToken, {}) if (!res.ok) { const error: e2b.paths['/teams']['get']['responses']['500']['content']['application/json'] = res.data as any