feat: add logout redirect url (#954)

* feat: add logout redirect url

* fix: format issue
This commit is contained in:
Meier Lukas
2024-08-09 19:24:07 +02:00
committed by GitHub
parent 67195c6051
commit 13e09968d9
5 changed files with 34 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ import "~/styles/scroll-area.scss";
import { ColorSchemeScript, createTheme, MantineProvider } from "@mantine/core";
import { env } from "@homarr/auth/env.mjs";
import { auth } from "@homarr/auth/next";
import { ModalProvider } from "@homarr/modals";
import { Notifications } from "@homarr/notifications";
@@ -56,7 +57,7 @@ export default function Layout(props: { children: React.ReactNode; params: { loc
const StackedProvider = composeWrappers([
async (innerProps) => {
const session = await auth();
return <AuthProvider session={session} {...innerProps} />;
return <AuthProvider session={session} logoutUrl={env.AUTH_LOGOUT_REDIRECT_URL} {...innerProps} />;
},
(innerProps) => <JotaiProvider {...innerProps} />,
(innerProps) => <TRPCReactProvider {...innerProps} />,