mirror of
https://github.com/harivansh-afk/Saas-Teamspace.git
synced 2026-04-20 05:04:49 +00:00
initial commit
This commit is contained in:
commit
ef9ccf22d3
133 changed files with 20802 additions and 0 deletions
17
next-auth.d.ts
vendored
Normal file
17
next-auth.d.ts
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { UserRole } from '@prisma/client'
|
||||
import NextAuth, { type DefaultSession } from 'next-auth'
|
||||
|
||||
// write extended user
|
||||
|
||||
// It is a bit messy, so in the future, checkout the docs for a better way to do this (authjs.dev/getting-started/typescript)
|
||||
|
||||
export type ExtendedUser = DefaultSession['user'] & {
|
||||
role: UserRole
|
||||
}
|
||||
|
||||
declare module 'next-auth' {
|
||||
interface Session {
|
||||
user: ExtendedUser
|
||||
userId: string
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue