mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-05 04:02:21 +02:00
♻️ Switch to next-auth for handling authentication (#899)
This commit is contained in:
parent
5f9e428432
commit
6fa66da681
65 changed files with 1514 additions and 1586 deletions
38
apps/web/declarations/next-auth.d.ts
vendored
Normal file
38
apps/web/declarations/next-auth.d.ts
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import type { TimeFormat } from "@rallly/database";
|
||||
import { extend } from "lodash";
|
||||
import NextAuth, { DefaultSession, DefaultUser } from "next-auth";
|
||||
import { DefaultJWT, JWT } from "next-auth/jwt";
|
||||
|
||||
declare module "next-auth" {
|
||||
/**
|
||||
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
|
||||
*/
|
||||
interface Session {
|
||||
user: {
|
||||
id: string;
|
||||
name?: string | null;
|
||||
email?: string | null;
|
||||
timeZone?: string | null;
|
||||
timeFormat?: TimeFormat | null;
|
||||
locale?: string | null;
|
||||
weekStart?: number | null;
|
||||
};
|
||||
}
|
||||
|
||||
interface User extends DefaultUser {
|
||||
locale?: string | null;
|
||||
timeZone?: string | null;
|
||||
timeFormat?: TimeFormat | null;
|
||||
weekStart?: number | null;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "next-auth/jwt" {
|
||||
interface JWT extends DefaultJWT {
|
||||
locale?: string | null;
|
||||
timeZone?: string | null;
|
||||
timeFormat?: TimeFormat | null;
|
||||
weekStart?: number | null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue