microsoft / vscode-azurestaticwebapps

Azure Static Web Apps extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps
MIT License
86 stars 33 forks source link

How do we authenticate using swa login in Visual studio code. #825

Closed janejeniferjohn closed 1 year ago

janejeniferjohn commented 1 year ago

Hi All

I am not able to login to Azure or authenticate from visual studio code. The login page does not launch when i give swa login. I also tried adding all parameters from Azure that swa login --help suggested. Please suggest if I need any more updates.

swa login

Welcome to Azure Static Web Apps CLI (1.1.1)

Using configuration "health-care" from file: C:\Users\eprab\OneDrive\Documents\POC\HealthCare\swa-cli.config.json

Checking Azure session... ✖ Failed to setup project: endpoints_resolution_error: Error: could not resolve endpoints. Please check network and try again. Detail: ClientConfigurationError: untrusted_authority: The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.

This is the swa-cli.config.jason and trying to deploy angular code

{ "$schema": "https://aka.ms/azure/static-web-apps-cli/schema", "configurations": { "health-care": { "appLocation": ".", "outputLocation": "dist\<>", "appBuildCommand": "npm run build", "run": "npm start", "appDevserverUrl": "http://localhost:4200" } } }

The errors happens at the swa deploy command as well

swa deploy

Welcome to Azure Static Web Apps CLI (1.1.1)

Using configuration "health-care" from file: C:\Users\eprab\OneDrive\Documents\POC\HealthCare\swa-cli.config.json

Deploying front-end files from folder: C:\Users\eprab\OneDrive\Documents\POC\HealthCare\dist\health-care-content

Checking Azure session... ✖ endpoints_resolution_error: Error: could not resolve endpoints. Please check network and try again. Detail: ClientConfigurationError: untrusted_authority: The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.

nturinski commented 1 year ago

Hi @janejeniferjohn

You're trying to log in to the Azure Static Web Apps CLI, but this is the Azure Static Web Apps extension. If you need help with the CLI, please file an issue here.

If you want to use the extension, you can sign in via the Azure Accounts extension and create a new Static Web App (which will deploy your current project).

AzCode-Bot commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!