mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 08:50:56 +01:00
* feat: implement board access control * fix: deepsource issues * wip: address pull request feedback * chore: address pull request feedback * fix: format issue * test: improve tests * fix: type and lint issue * chore: address pull request feedback * refactor: rename board procedures
28 lines
796 B
TypeScript
28 lines
796 B
TypeScript
import { cache } from "react";
|
|
import type { DefaultSession } from "@auth/core/types";
|
|
|
|
import { createConfiguration } from "./configuration";
|
|
|
|
export type { Session } from "next-auth";
|
|
|
|
declare module "next-auth" {
|
|
interface Session {
|
|
user: {
|
|
id: string;
|
|
} & DefaultSession["user"];
|
|
}
|
|
}
|
|
|
|
export * from "./security";
|
|
|
|
export const createHandlers = (isCredentialsRequest: boolean) =>
|
|
createConfiguration(isCredentialsRequest);
|
|
const { auth: defaultAuth } = createConfiguration(false);
|
|
|
|
/**
|
|
* This is the main way to get session data for your RSCs.
|
|
* This will de-duplicate all calls to next-auth's default `auth()` function and only call it once per request
|
|
*/
|
|
export const auth = cache(defaultAuth);
|
|
export { getSessionFromToken, sessionTokenCookieName } from "./session";
|