nuxt-auth
nuxt-auth copied to clipboard
Invalid type of `SignInResult` when using `redirect: false`
Environment
Nuxt project info:
------------------------------
- Operating System: Windows_NT
- Node Version: v20.4.0
- Nuxt Version: 3.6.5
- Nitro Version: 2.5.2
- Package Manager: [email protected]
- Builder: vite
- User Config: runtimeConfig, ssr, app, telemetry, imports, modules, vite, build, postcss, typescript, vue, experimental, nitro
- Runtime Modules: [email protected], @sidebase/[email protected], @sidebase/[email protected], @pinia/[email protected], @vueuse/[email protected], [email protected], @nuxt/[email protected]
- Build Modules: -
------------------------------
Reproduction
- install module
- try signin using
redirect: false
- result of signin is untyped.
Describe the bug
Typescript does not recognize type of SignInResult
type, therefore unabel to extract error
or url
from result without specifying // @ts-ignore
Additional context
const { error, url } = await useAuth().signIn('credentials', {
username: username.value,
password: password.value,
redirect: false,
})
Logs
No response
P.S. Great job on this module! This was the missing puzzle piece for Nuxt 3. 🥳