mirror of
https://github.com/tale/headplane.git
synced 2026-08-31 17:28:14 +00:00
feat: better error handling for oidc api key
This also ships with a better error page
This commit is contained in:
@@ -20,7 +20,7 @@ export async function loader({
|
||||
request,
|
||||
context,
|
||||
}: LoaderFunctionArgs<LoadContext>) {
|
||||
if (!context.oidc) {
|
||||
if (!context.oidc || typeof context.oidc === 'string') {
|
||||
throw new Error('OIDC is not enabled');
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ export async function loader({
|
||||
// keys because they are currently non-deletable in the headscale
|
||||
// database. Look at this in the future once we have a solution
|
||||
// or we have permissioned API keys.
|
||||
api_key: context.config.oidc?.headscale_api_key!,
|
||||
api_key: context.config.oidc!.headscale_api_key,
|
||||
user,
|
||||
}),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user