mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-26 16:30:57 +01:00
* refactor: replace signIn callback with signIn event, adjust getUserByEmail in adapter to check provider * test: adjusting tests for adapter and events * docs: add comments for unknown auth provider * fix: missing dayjs import
26 lines
800 B
TypeScript
26 lines
800 B
TypeScript
import { headers } from "next/headers";
|
|
import type { DefaultSession } from "@auth/core/types";
|
|
|
|
import type { ColorScheme, GroupPermissionKey, SupportedAuthProvider } from "@homarr/definitions";
|
|
|
|
import { createConfiguration } from "./configuration";
|
|
|
|
export type { Session } from "next-auth";
|
|
|
|
declare module "next-auth" {
|
|
interface Session {
|
|
user: {
|
|
id: string;
|
|
permissions: GroupPermissionKey[];
|
|
colorScheme: ColorScheme;
|
|
} & DefaultSession["user"];
|
|
}
|
|
}
|
|
|
|
export * from "./security";
|
|
|
|
// See why it's unknown in the [...nextauth]/route.ts file
|
|
export const createHandlers = (provider: SupportedAuthProvider | "unknown") => createConfiguration(provider, headers());
|
|
|
|
export { getSessionFromTokenAsync as getSessionFromToken, sessionTokenCookieName } from "./session";
|