Package path ./providers/credentials is not exported from package

Hi,

I’m using next-auth v5, and it seems that MoralisNextAuthProvider() isn’t being accepted as provider when trying to configure the auth.ts file:

import { MoralisNextAuthProvider } from '@moralisweb3/next'
import { nanoid } from 'nanoid'
import NextAuth from 'next-auth'

export const { handlers, signIn, signOut, auth } = NextAuth({
  providers: [MoralisNextAuthProvider()],
  pages: {
    signIn: '/',
    error: '/404',
    signOut: '/'
  },
  session: {
    strategy: 'jwt'
  },
  callbacks: {
    jwt: async ({ token, user }: any) => {
      user && (token.user = user)

      return token
    },
./node_modules/@moralisweb3/next/lib/auth/MoralisNextAuthProvider.js:55:1

Module not found: Package path ./providers/credentials is not exported from package C:\Users\user\Documents\GitHub\project\node_modules\next-auth (see exports field in C:\Users\user\Documents\GitHub\project\node_modules\next-auth\package.json)

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/@moralisweb3/next/lib/auth/index.js
./node_modules/@moralisweb3/next/lib/index.js

Thanks for your help!

Hi @NeckRawfeel

I dont think MoralisNextAuthProvider is meant to be used like that. Are you referring to any documentation for this?

Next auth only accepts certain web2 providers.