sidebase / nuxt-auth

Authentication built for Nuxt 3! Easily add authentication via OAuth providers, credentials or Email Magic URLs!
https://auth.sidebase.io
MIT License
1.31k stars 164 forks source link

Setting getSession to false inorder to disable results in type-check error #761

Closed HELWATANY closed 4 months ago

HELWATANY commented 5 months ago

Environment

------------------------------
- Operating System: Windows_NT
- Node Version:     v20.11.1
- Nuxt Version:     3.11.2
- CLI Version:      3.11.1
- Nitro Version:    2.9.6
- Package Manager:  pnpm@9.1.4
- Builder:          -
- User Config:      devtools, devServer, runtimeConfig, modules, pinia, capo, postcss, tailwindcss, auth, i18n, lodash, dayjs
- Runtime Modules:  @nuxt/eslint@0.3.13, @nuxtjs/stylelint-module@5.2.0, @nuxt/test-utils/module@3.13.1, nuxt-capo@0.2.0, @unlazy/nuxt@0.11.3, @nuxtjs/partytown@1.5.0, @nuxtjs/i18n@8.3.1, @pinia/nuxt@0.5.1, @nuxt/fonts@0.7.0, @vueuse/nuxt@10.10.0, nuxt-lodash@2.5.3, dayjs-nuxt@2.1.9, nuxt-swiper@1.2.2, @formkit/auto-animate/nuxt@0.8.2, @nuxtjs/tailwindcss@6.12.0, @sidebase/nuxt-auth@0.7.2
- Build Modules:    -
------------------------------

Reproduction

Customize the auth configurations as follows

{
  auth: {
    baseURL: '/api/auth',
    provider: {
      type: 'local',
      endpoints: {
        getSession: false
      }
    }
  }
}

Describe the bug

As mentioned in the documentation, to disable any of the endpoints you can set it to false but doing that will result in a type-check error

setting the getSession endpoint to false returns type-check error

Additional context

No response

Logs

No response