Open outofthisworld opened 8 months ago
+1 same here
"@auth/core": "^0.22.0", "@hebilicious/authjs-nuxt": "^0.3.5",
Downgrading @auth/core to 0.17.0 works.
This is especially sad cause @auth/core just added (experimental) passkey support
same
On each new release, authjs tends to break things.
Since this package is not official (I've contacted their team but they are not interested in prioritising Nuxt support), on every authjs minor semver update, this package might need to be updated by trying to figure out what changed on the auth/core side and doing the necessary changes here.
Obviously this isn't sustainable, especially since I don't personally use authjs, or this module anymore. It should be possible for anyone that do use this module to either patch or submit a PR to make it work with the latest version.
Sad to hear that but i understand your position, it looks like it's time to migrate to Lucia for me.
I ran into the same problem, which seemed to be introduced with core v0.22 here
It's where basePath is set to default to /auth
when not specified in AuthConfig. However since I followed the basic example, the basePath for me was actually /api/auth
(folder structure: /server/api/auth/[...].ts
).
Setting the basePath to /api/auth
solved the issue for me and I was able to run core v.0.26.3. As I'm still in early development phase I can't guarantee that everything works though. I tested it with Azure AD B2C as provider.
Hope I could help :)
Thanks for investigation @levisticum ! I think this deserves a doc inclusion and we can close this then.
@Shhu I think Lucia is great and https://github.com/Atinux/nuxt-auth-utils is another potential alternative. But it seems that auth.js is quite popular and with a few extra contributors, I believe things can keep moving forward.
However I think the split between this module/sidebase and nextauth/auth.js is overall bad for the ecosystem.
Yeah, it's unfortunate that the authjs team isn't willing to upstream this to an official repo, but having multiple repos using the same auth stack trying to solve the exact same issue is just splitting the community up. Imo, it does make sense to stick to authjs instead of next-auth though, since that's what the authjs team is planning ahead for, and it makes sense to future proof the auth solution. Maybe there's a need to consolidate this module and sidebase module so there's more maintainers working on the same thing
Environment
Darwin
v19.9.0
3.9.3
3.10.0
2.8.1
pnpm@8.2.0
-
devtools
,modules
,authJs
,runtimeConfig
nuxt-security@1.0.1
,@hebilicious/authjs-nuxt@0.3.5
-
Reproduction
Fairly obvious :)
Describe the bug
Fresh project, latest auth core, issue hitting
/api/auth/session
endpoint.Additional context
No response
Logs