Files
outline/plugins/google/server/index.ts
T

17 lines
406 B
TypeScript

import { PluginManager, Hook } from "@server/utils/PluginManager";
import config from "../plugin.json";
import router from "./auth/google";
import env from "./env";
const enabled = !!env.GOOGLE_CLIENT_ID && !!env.GOOGLE_CLIENT_SECRET;
if (enabled) {
PluginManager.add([
{
...config,
type: Hook.AuthProvider,
value: { router, id: config.id, allowEmailMatch: true },
},
]);
}