I've found out that bcrypt is not working in AuthOptions authorize function in next-auth...any ideas how to resolve? This only happens when using unstable_ServerSession. It works good for logging in.
I think the problem is because bcrypt use @mapbox which is a server component.
When using unstable_ServerSession on a nextJs 13 Server Component, somehow it use @mapbox on client side so i get the error.
I solved using "bcryptjs" instead than "bcrypt" inside api/[...nextauth].js.
Is bcryptjs as good as bcrypt? Any opinion about my solution?