denoland / denoland/deploy_feedback
[Bug]: Access Token created for an Organization do not work, while personal tokens do.
- Dominant language
- No language data
- Stars
- 79
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
I have able to execute the following command successfully with my personal token:
```
deployctl projects list --token=PERSONAL_ACCESS_TOKEN
```
But when I attempt to so with an organization token
```
deployctl projects list --token=ORGANIZATION_ACCESS_TOKEN
```
I get the following error:
```
⠙ Fetching organizations and projects...
error: Uncaught (in promise) APIError: Access Denied
throw new APIError(json.code, json.message, xDenoRay);
^
at API.#requestJson (https://jsr.io/@deno/deployctl/1.13.1/src/utils/api.ts:183:13)
at eventLoopTick (ext:core/01_core.js:179:7)
at async API.listOrganizations (https://jsr.io/@deno/deployctl/1.13.1/src/utils/api.ts:249:12)
at async listProjects (https://jsr.io/@deno/deployctl/1.13.1/src/subcommands/projects.ts:71:17)
at async default (https://jsr.io/@deno/deployctl/1.13.1/src/subcommands/projects.ts:46:7)
at async https://jsr.io/@deno/deployctl/1.13.1/deployctl.ts:123:5
```
### Steps to reproduce
1. Create an organization token from the deploy dashboard
2. Run the following command: `deployctl projects list --token=TOKEN` where token is the token you just generated.
### Expected behavior
No exception, but instead a listing of that organization's projects
### Environment
```
deno --version
deno 2.4.3 (stable, release, aarch64-apple-darwin)
v8 13.7.152.14-rusty
typescript 5.8.3
```
### Possible solution
_No response_
### Additional context
The organization that I'm encountering this with is the `frontside` organization.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with an organization token for the frontside organization. Inspect src/utils/api.ts around API.#requestJson and API.listOrganizations, then trace the projects subcommand in src/subcommands/projects.ts. Done means deployctl projects list returns that organization's projects without Access Denied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, authentication, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100