Skip to content

CLI Token Authentication Issue #331

Open
@zeshanziya

Description

@zeshanziya

I'm trying to use this library in a Node.js project and authenticate using a CLI token, but I'm encountering a few issues.

TypeScript Errors

When trying to create a client as per the documentation, it shows that the api_url and authorization keys are missing. These should be optional when using a CLI token.

When I try the following code:

const client = new Client({
  api_token: 'my-cli-token',
  api_url: 'https://api.platform.sh/api',
  authorization: '',
});

I receive the following error:

Unhandled rejection window is not defined
type=unhandledRejection
stack=ReferenceError: window is not defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions