Add hooks for providing our own login UI

This commit is contained in:
Johannes Zellner
2023-03-10 17:13:33 +01:00
parent bab3de137b
commit 31e900cb9c
2 changed files with 241 additions and 9 deletions
+5 -1
View File
@@ -369,7 +369,11 @@ async function initializeExpressSync() {
// well known
router.get ('/well-known-handler/*', routes.wellknown.get);
app.use('/api/v1/oidc', await oidc.getMiddleware('/api/v1/oidc'));
// OpenID connect
const oidcPrefix = '/api/v1/oidc';
const oidcProvider = await oidc.getProvider(oidcPrefix);
oidc.attachInteractionRoutes(oidcPrefix, app, oidcProvider);
app.use(oidcPrefix, oidcProvider.callback());
// disable server socket "idle" timeout. we use the timeout middleware to handle timeouts on a route level
// we rely on nginx for timeouts on the TCP level (see client_header_timeout)