mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
17 lines
465 B
JavaScript
17 lines
465 B
JavaScript
"use client";
|
|
|
|
import { SessionProvider } from "next-auth/react";
|
|
|
|
export function NextAuthProvider({ children }) {
|
|
return (
|
|
<SessionProvider
|
|
// Options to make session more reliable
|
|
refetchInterval={5 * 60} // Refetch session every 5 minutes (in seconds)
|
|
refetchOnWindowFocus={true} // Refetch when window gets focus
|
|
refetchWhenOffline={false} // Don't try to refetch when offline
|
|
>
|
|
{children}
|
|
</SessionProvider>
|
|
);
|
|
}
|