mirror of
https://github.com/tale/headplane.git
synced 2026-08-10 05:56:52 +00:00
feat: cleanup oidc logic and surface errors better
This commit is contained in:
+4
-3
@@ -8,7 +8,6 @@ import { createDbClient } from './db/client.server';
|
||||
import { createHeadscaleInterface } from './headscale/api';
|
||||
import { loadHeadscaleConfig } from './headscale/config-loader';
|
||||
import { createHeadplaneAgent } from './hp-agent';
|
||||
import { configureOidcAuth } from './web/oidc';
|
||||
import { createSessionStorage } from './web/sessions';
|
||||
|
||||
declare global {
|
||||
@@ -40,6 +39,8 @@ const hsApi = await createHeadscaleInterface(
|
||||
export type LoadContext = typeof appLoadContext;
|
||||
|
||||
import 'react-router';
|
||||
import { createOidcConnector } from './web/oidc-connector';
|
||||
|
||||
declare module 'react-router' {
|
||||
interface AppLoadContext extends LoadContext {}
|
||||
}
|
||||
@@ -68,8 +69,8 @@ const appLoadContext = {
|
||||
hsApi,
|
||||
agents,
|
||||
integration: await loadIntegration(config.integration),
|
||||
oidc: config.oidc
|
||||
? await configureOidcAuth(
|
||||
oidcConnector: config.oidc
|
||||
? await createOidcConnector(
|
||||
config.oidc,
|
||||
hsApi.getRuntimeClient(config.oidc.headscale_api_key),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user