Closed DevHumbleChris closed 1 year ago
show yours /api/auth/[...].js file
Yeah I'm having the same issue. Currently just trying to make my sign-in method console.log the credentials. Here is my ~/server/api/auth/[...].ts
file:
Hey @DevHumbleChris and @SoundFractures, if you have a backend or static Nuxt application, use the local
provider to authenticate users based on their email and password. For OAuth providers such as Google, Github, Twitter etc, use the authjs
provider. You can learn more about this here: https://sidebase.io/nuxt-auth/v0.6/getting-started#which-provider-should-i-pick
@selemondev It's the local strategy that I did used and still went to get the same error.
For any OAuth related authentication, go with nuxt-sidebase-auth v0.5
since it utilizes next-auth under the hood, but if you need fine grained control over the authentication flow, go with nuxt-sidebase-auth v0.6
pre-release. Check it out here: https://sidebase.io/nuxt-auth/v0.6/getting-started#which-provider-should-i-pick
Did anyone make any progress with this?
I'm facing exactly the same...
Who got same issue i put callbackUrl on signIn function call like this signIn('credentials', { email: email.value, password: password.value, callbackUrl: '/dashboard' });
and this worked really fine for me on 0.6.0-beta.3 version
I get the same error when i'am unauthenticated and want to access a page that is protected by middleware.
I permantly get redirected to /api/auth/callback/credentials
.
LoginPages etc. getting ignored.
When i`am logged in, everything is fine.
@develth try this template i did create:
seem like this would result in use own middleware etc & not work with nuxt-auth?
Discussed in https://github.com/sidebase/nuxt-auth/discussions/468