Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Token Authentication Issue #331

Open
zeshanziya opened this issue Aug 29, 2024 · 0 comments
Open

CLI Token Authentication Issue #331

zeshanziya opened this issue Aug 29, 2024 · 0 comments

Comments

@zeshanziya
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant