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

Support reusing credentials from azure/login action #751

Open
rhuanbarreto opened this issue Sep 29, 2023 · 1 comment · May be fixed by #774
Open

Support reusing credentials from azure/login action #751

rhuanbarreto opened this issue Sep 29, 2023 · 1 comment · May be fixed by #774

Comments

@rhuanbarreto
Copy link

Is your feature request related to a problem? Please describe.

I'm trying to use the SWA CLI in order to have more control over the the build and deployment of multiple environments in GitHub. So I'm not using the GitHub action. I normally use the federated login from Github in order to perform tasks in workflows and the azure/login action. Doing this, I don't need to setup client secrets. But this fails:

... Build steps ...
- name: Azure login
  uses: azure/login@v1
  with:
    client-id: ${{ vars.APP_CLIENT_ID }}
    tenant-id: ${{ vars.APP_TENANT_ID }}
    allow-no-subscriptions: true
- name: Deploy
  run: |
    npm i -g @azure/static-web-apps-cli
    swa deploy --no-use-keychain --config-name ${{matrix.environment}} --env Production

It gets stuck trying to open a browser and wait for a device code login. SWA CLI only accepts client secrets as an identity.

Describe the solution you'd like

I wanted the SWA CLI to reuse the credentials already set in the azure/login action so it doesn't need to use client secrets.

Describe alternatives you've considered

So far only alternative today is to use client secrets

Additional context

@rhuanbarreto rhuanbarreto changed the title Support reusing credentials from Support reusing credentials from azure/login action Sep 29, 2023
@shibayan shibayan linked a pull request Nov 4, 2023 that will close this issue
@rhuanbarreto
Copy link
Author

Thanks for the PR @shibayan! Do you know if the team can accept the PR and put it on the CLI?

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

Successfully merging a pull request may close this issue.

1 participant