Trying to implement the Credentials Provider in NextJs ("next": "^12.0.7") and NextAuth ("next-auth": "^4.1.2") using TypeScript has been a challenge. I am encountering difficulties in getting the function to work correctly.
Below is the code snippet from /pages/api/[...nextauth].ts
import NextAuth, { } from "next-auth";
import CredentialsProvider from "next-auth/providers/credentials";
import { verifyOTP } from "@/lib/otp";
// Code block here...
export default NextAuth({
// Configuration details...
})
Every time I attempt to build this application, I encounter the following error message:
Error message snippet here...
The contents of my .tsconfig
file are as follows:
Contents of .tsconfig file goes here...