adobe / adobe/aio-cli-plugin-console
Add a verification check on Org Code, whether it is the correct one for the project
- Lingua principale
- JavaScript
- Stelle
- 8
- Fork
- 11
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
A dev might have logged into another Org, and used the logged-in access token (from the web browser) to do operations on their current Project. This is a mismatch, and results in an error when accessing certain operations.
## Error
```sh
$ aio console project list
» Error: [CoreConsoleAPISDK:ERROR_GET_PROJECTS_BY_ORG_ID] 403 - Forbidden
» ({"id":"f43a63e9-a891-4b53-9416-2a83c55aa08b","messages":[{"template":"ERR_MSG_OPERAT
» ION_NOT_ALLOWED","message":"User [REDACTED_USER]
» not allowed to access resources of org [REDACTED_ORG_ID]"}]})
```
## Investigation
The Org Code from running `aio console org ls` does not match the Org Code when running `aio config get project.org.ims_org_id`.
This value is in the `.aio` file of the project.
An access token is tied to a specific Org.
## Resolution
1. Go to https://developer.adobe.com/console, logout from the browser
2. Run `aio logout --force`
3. Run `aio login`
Then run your command again.
## Diagnostic Fix
The fix is above, but for diagnostic purposes, there should be a command, or a flag to a command, that can show there is an Org Code mismatch, thus the dev needs to login again via the `Resolution` step above. Perhaps it is a good candidate for `aio info`
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo la discrepanza con `aio console org ls` e `aio config get project.org.ims_org_id`, tenendo presente che il valore del progetto è memorizzato in `.aio`. Definisci il comportamento diagnostico per `aio info` o un altro comando e considera il lavoro completato quando identifica chiaramente un Org Code mismatch e indica i passaggi di logout e login per risolverlo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- cli, developer-experience
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100