Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Missing domain key from auth0 strategy options #120

Open
juusopiikkila opened this issue Jul 29, 2024 · 0 comments
Open

Missing domain key from auth0 strategy options #120

juusopiikkila opened this issue Jul 29, 2024 · 0 comments

Comments

@juusopiikkila
Copy link

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: '/#',
            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

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant