microsoft / microsoft/aspire

Aspire + Nuxt + Entra support

Open
#13,716 3 comments 1 reaction 0 assignees View on GitHub
area-integrations
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

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

I am not able to configure nuxt and entra auth with existing integrations.
```

builder
.AddJavaScriptApp("nuxtfrontend", "../SpecVector.Nuxt", "dev")
.WithNpm()
.WithReference(apiService)
.WaitFor(apiService)
.WithHttpEndpoint(port: 3000, env: "PORT")
.WithExternalHttpEndpoints()
.WithEnvironment("NUXT_PUBLIC_AZURE_CLIENT_ID", azureClientId)
.WithEnvironment("NUXT_PUBLIC_AZURE_TENANT_ID", azureTenantId)
.WithEnvironment("NUXT_PUBLIC_AZURE_API_SCOPE", azureApiScope)
.WithEnvironment("NUXT_PUBLIC_AZURE_REDIRECT_URI", azureRedirectUri);
```

Nuxt app is running as http://nuxtfrontend-specvector.dev.localhost:3000/

Azure app registration only accepts http://localhost for insecure domains. If the nuxt app redirects to http://localhost the auth token no longer matches http://nuxtfrontend-specvector.dev.localhost:3000 and cant be retrieved from localstorage by msal.

I tried enabling https using AddViteApp in order to redirect to https://nuxtfrontend-specvector.dev.localhost:3000 however this does not seem to be compatible with Nuxt as the cert is not picked up and the site is insecure.

The auth does work if you access the app directly on http://localhost:3000

### Describe the solution you'd like

Have Nuxt recognise the https cert provided by AddViteApp

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.