mirror of
https://github.com/ProjectSegfault/website.git
synced 2024-12-24 05:59:50 +05:30
27 lines
574 B
TypeScript
27 lines
574 B
TypeScript
import { SvelteKitAuth } from "@auth/sveltekit"
|
|
import Authentik from '@auth/core/providers/authentik';
|
|
import { env } from "$env/dynamic/private";
|
|
import statusData from "$lib/statusData";
|
|
import map from "$lib/map";
|
|
|
|
export const handle = SvelteKitAuth({
|
|
providers: [
|
|
//@ts-ignore
|
|
Authentik({
|
|
clientId: env.AUTH_CLIENT_ID,
|
|
clientSecret: env.AUTH_CLIENT_SECRET,
|
|
issuer: env.AUTH_ISSUER
|
|
})
|
|
]
|
|
})
|
|
|
|
const updateMap = () => {
|
|
map.set("data", {
|
|
status: statusData,
|
|
updated: Math.floor(Date.now() / 1000)
|
|
});
|
|
};
|
|
|
|
updateMap();
|
|
|
|
setInterval(updateMap, 30000); |