Azure / Azure/static-web-apps-cli
SWA CLI Tool Device Login
- Lingua principale
- TypeScript
- Stelle
- 668
- Fork
- 155
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Using version `2.0.6`.
**Are you accessing the CLI from the default port `:4280` ?**
- [ ] No, I am using a different port number (`--port`) and accessing the CLI from that port
- [x] Yes, I am accessing the CLI from port `:4280`
**Describe the bug**
I'm trying to authenticate the SWA CLI tool to deploy a simple static web application. After the initial authentication which succeeds I'm asked to re-auth with a devicelogin token, which our Azure admins have disabled. Is there any other way to authorise this without the devicelogin flow?
With verbose debugging turned on the last entry is:
azure:identity:info DeviceCodeCredential => MSAL Node V2 info message: [Mon, 28 Jul 2025 03:41:44 GMT] : [719c6b7d-da6e-461c-a575-a87a2c035eeb] : @azure/msal-common@15.9.0 : Info - Authorization pending. Continue polling.
**To Reproduce**
Steps to reproduce the behavior:
1. Go into your terminal
2. Type in command 'swa deploy'
3. 'Checking Azure session..." opens browser window and proceed to Authorize
4. Receive message 'Auth code was successfully acquired. You can close this window now.'
5. CLI now shows "To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XXXXXXXX to authenticate."
**Expected behavior**
After initial authorization not expecting additional auth prompts.
**Desktop (please complete the following information):**
- Mac OS X 15.5 (24F74).
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il flusso dal punto di ingresso `swa deploy` su macOS con l'autenticazione Azure abilitata, quindi esamina il log dettagliato relativo a `DeviceCodeCredential` e alla precedente autorizzazione tramite browser. Determina perché all'autorizzazione iniziale segue una richiesta di accesso tramite dispositivo e considera completato il lavoro quando il deployment può essere completato senza richiedere il flusso di accesso tramite dispositivo disabilitato, con una copertura per la sequenza segnalata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, typescript
- Ambito
- authentication, cli, cloud
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 32/100