-
-
Notifications
You must be signed in to change notification settings - Fork 185
Open
Labels
bugA bug that needs to be resolvedA bug that needs to be resolvedpendingAn issue waiting for triageAn issue waiting for triage
Description
Environment
bunx nuxi info
- Operating System:
Linux
- Node Version:
v20.9.0
- Nuxt Version:
3.15.4
- CLI Version:
3.21.1
- Nitro Version:
2.10.4
- Package Manager:
[email protected]
- Builder: -
- User Config:
ssr, runtimeConfig, compatibilityDate, vite, devtools, modules, auth
- Runtime Modules:
@sidebase/[email protected]
- Build Modules: -
Reproduction
- Install
@sidebase/[email protected]
in a Nuxt project. - Attempt to disable the
signUp
endpoint by setting it tofalse
in the configuration:
auth: {
provider: {
type: 'local',
endpoints: {
signUp: false,
}
}
}
Describe the bug
The documentation for sidebase/nuxt-auth
states that endpoints can be disabled by setting them to false
:
"You can customize each endpoint to fit your needs or disable it by setting it to
false
. For example you may want to disable thesignUp
endpoint. "
However, this feature is not yet released and only exists in the main branch. In the current version (v0.10.0
), attempting to set an endpoint to false
results in a TypeScript error:
Type 'false' has no properties in common with type '{ path?: string | undefined; method?: "options" | "head" | "get" | "patch" | "post" | "put" | "delete" | "connect" | "trace" | undefined; }'.ts(2559)
Additional context
- In version
0.10.0
, thesignUp
method in useAuth.ts does not check whether the endpoint isfalse
before attempting to use it. - The TypeScript definition in types.ts does not allow
false
forsignUp
The feature to disable endpoints with false
exists in the main
branch but has not been included in any released version.
Updating the documentation to clarify that this feature is not available yet would prevent confusion.
main: useAuth.ts , types.ts
avrtau
Metadata
Metadata
Assignees
Labels
bugA bug that needs to be resolvedA bug that needs to be resolvedpendingAn issue waiting for triageAn issue waiting for triage