Removing default properties from JWT/User types.
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
next-auth.d.tsimport { DefaultSession } from "next-auth";
declare module "next-auth" {
interface Session extends DefaultSession {
user?: User;
}
interface User {
id: string;
}
}
declare module "next-auth/jwt" {
interface JWT {
id: string;
}
}I'm attempting to remove default properties such as name, email, picture, and sub and only have an id property.
Because the profile callback of a provider user object is empty if I do not provide an email, name, and image.
I tried omit to remove the properties, but they were still present.
1 Reply
Giant pandaOP
Relate & unanswered: https://github.com/nextauthjs/next-auth/discussions/8419