Skip to content

Missing domain key from auth0 strategy options #120

Description

@juusopiikkila

Environment

- Operating System: Darwin
- Node Version:     v20.16.0
- Nuxt Version:     3.12.4
- CLI Version:      3.12.0
- Nitro Version:    2.9.7
- Package Manager:  yarn@4.2.2
- Builder:          -
- User Config:      ssr, runtimeConfig, experimental, css, typescript, components, modules, auth, googleFonts, tailwindcss, i18n, image, headlessui, build, app
- Runtime Modules:  @nuxt-alt/auth@3.1.7, @pinia/nuxt@0.5.2, @nuxtjs/tailwindcss@6.12.1, @vueuse/nuxt@10.11.0, @nuxtjs/i18n@8.3.3, nuxt-headlessui@1.2.0, @nuxtjs/google-fonts@3.2.0, @nuxt/image@1.7.0
- Build Modules:    -

Nuxt Config

export default defineNuxtConfig({
    modules: [
        '@nuxt-alt/auth',
        '@pinia/nuxt',
    ],

    auth: {
        globalMiddleware: true,
        redirect: {
            login: '/login',
            logout: `${process.env.NUXT_APP_BASE_URL || ''}/`,
            home: `${process.env.NUXT_APP_BASE_URL || ''}/`,
            callback: `${process.env.NUXT_APP_BASE_URL || ''}/callback`,
        },
        defaultStrategy: 'auth0',
        redirectStrategy: 'query',
        stores: {
            local: {
                enabled: false,
            },
            session: {
                enabled: false,
            },
            cookie: {
                enabled: true,
                prefix: 'auth.',
                options: {
                    maxAge: 86_400 * 30,
                    path: process.env.NUXT_APP_BASE_URL || '/',
                },
            },
        },
        strategies: {
            auth0: {
                domain: process.env.AUTH0_DOMAIN,
                clientId: process.env.AUTH0_CLIENT_ID,
                audience: '###audience###',
                scope: ['openid', 'profile', 'email', 'offline_access'],
                responseType: 'code',
                grantType: 'authorization_code',
                codeChallengeMethod: 'S256',
            },
        },
    },
});

Reproduction

Add auth0 stragegy to the config and add domain key

Describe the bug

When using auth0 strategy it says that Object literal may only specify known properties, and 'domain' does not exist in type 'StrategyOptions'. even though it is used in the provider

Additional context

No response

Logs

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions