I’m getting this error, anyone know why?
Unknown argument `type`. Did you mean `name`? Available options are marked with ?. {
message: '\n' +
'Invalid `prisma.user.create()` invocation:\n' +
'\n' +
'{\n' +
' data: {\n' +
' type: "roblox",\n' +
' ~~~~\n' +
' name: "flvffywvffy",\n' +
' displayName: "flvffy",\n' +
' include: [\n' +
' "name",\n' +
' "displayName",\n' +
' "avatar"\n' +
' ],\n' +
' email: undefined,\n' +
' emailVerified: null,\n' +
'? id?: String,\n' +
'? bio?: String | Null,\n' +
'? age?: Int | Null,\n' +
'? image?: String | Null,\n' +
'? accounts?: AccountCreateNestedManyWithoutUserInput,\n' +
'? sessions?: SessionCreateNestedManyWithoutUserInput,\n' +
'? products?: ProductOwnerCreateNestedManyWithoutUserInput\n' +
' }\n' +
'}\n' +
'\n' +
'Unknown argument `type`. Did you mean `name`? Available options are marked with ?.',
stack: 'PrismaClientValidationError: \n' +
'Invalid `prisma.user.create()` invocation:\n' +
'\n' +
'{\n' +
' data: {\n' +
' type: "roblox",\n' +
' ~~~~\n' +
' name: "flvffywvffy",\n' +
' displayName: "flvffy",\n' +
' include: [\n' +
' "name",\n' +
' "displayName",\n' +
' "avatar"\n' +
' ],\n' +
' email: undefined,\n' +
' emailVerified: null,\n' +
'? id?: String,\n' +
'? bio?: String | Null,\n' +
'? age?: Int | Null,\n' +
'? image?: String | Null,\n' +
'? accounts?: AccountCreateNestedManyWithoutUserInput,\n' +
'? sessions?: SessionCreateNestedManyWithoutUserInput,\n' +
'? products?: ProductOwnerCreateNestedManyWithoutUserInput\n' +
' }\n' +
'}\n' +
'\n' +
'Unknown argument `type`. Did you mean `name`? Available options are marked with ?
Heres my code:
import NextAuth from "next-auth";
import type { NextAuthOptions } from "next-auth";
import type { OAuthConfig } from "next-auth/providers/oauth";
// import DiscordProvider from "next-auth/providers/discord";
// @ts-ignore
import { RobloxProvider, RobloxProviderCallbacks_Jwt } from "roblox-provider";
import { prisma } from "@/lib/prisma";
import { PrismaAdapter } from "@next-auth/prisma-adapter";
export const authOptions: NextAuthOptions = {
adapter: PrismaAdapter(prisma),
providers: [
// DiscordProvider({
// clientId: process.env.DISCORD_ID!,
// clientSecret: process.env.DISCORD_SECRET!,
// }),
RobloxProvider({
clientId: process.env.ROBLOX_ID,
clientSecret: process.env.ROBLOX_SECRET,
redirectUri: process.env.ROBLOX_REDIRECT,
scopes: ["openid", "profile"],
include: ["name", "displayName", "avatar"],
}),
],
callbacks: RobloxProviderCallbacks_Jwt,
};
const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };