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

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:  [email protected]
- Builder:          -
- User Config:      ssr, runtimeConfig, experimental, css, typescript, components, modules, auth, googleFonts, tailwindcss, i18n, image, headlessui, build, app
- Runtime Modules:  @nuxt-alt/[email protected], @pinia/[email protected], @nuxtjs/[email protected], @vueuse/[email protected], @nuxtjs/[email protected], [email protected], @nuxtjs/[email protected], @nuxt/[email protected]
- 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

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

No branches or pull requests

1 participant