Skip to content

Aspire + Nuxt + Entra support #13716

@joe-mills

Description

@joe-mills

Is there an existing issue for this?

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions