TobyMcCann
TTCTheo's Typesafe Cult
•Created by Debaucus on 5/31/2023 in #questions
Change ctx.session.user values to include new ones? Bad idea?
You can do this in your auth.ts where the next-auth module is extended. Make sure you don't add anything sensitive when extending.
```
import type { Role } from "@prisma/client";
import { DefaultSession } from "next-auth";
declare module "next-auth" {
interface Session {
user?: {
id: string;
role: Role
} & DefaultSession["user"];
}
interface User {
id: string;
role: Role;
// ...other properties
}
}
5 replies
TTCTheo's Typesafe Cult
•Created by julius on 12/2/2022 in #questions
Radix UI Select as Form Input
@julius Did you ever figure this one out?
52 replies