mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 01:01:20 +10:00
feat: oidc
This commit is contained in:
10
server/routes/auth/oidc.get.ts
Normal file
10
server/routes/auth/oidc.get.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { enabledAuthManagers } from "~/server/plugins/04.auth-init";
|
||||
|
||||
export default defineEventHandler((h3) => {
|
||||
if (!enabledAuthManagers.oidc) return sendRedirect(h3, "/auth/signin");
|
||||
|
||||
const manager = enabledAuthManagers.oidc;
|
||||
const { redirectUrl } = manager.generateAuthSession();
|
||||
|
||||
return sendRedirect(h3, redirectUrl);
|
||||
});
|
||||
Reference in New Issue
Block a user