next-auth

NextAuth with custom Credential Provider Not creating session

无人久伴 提交于 2021-01-05 08:05:54
问题 I am attempting to implement NextAuth in my NextJs app. I am following the official documentation. But for one reason or the other, it seems like the user session object is not generated on login. Here is my code from my pages/api/auth/[...nextauth].js file import NextAuth from "next-auth"; import Providers from "next-auth/providers"; import axios from "axios"; export default (req, res) => NextAuth(req, res, { providers: [ Providers.Credentials({ id: 'app-login', name: APP authorize: async