From b22999d78af9cfce47f4b6f3abddf0e863e4e335 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 18 May 2022 15:56:40 +0200 Subject: [PATCH] hedgedoc: add authentik --- nixos/hosts/hedgedoc/configuration.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/nixos/hosts/hedgedoc/configuration.nix b/nixos/hosts/hedgedoc/configuration.nix index 903749b..c3d0429 100644 --- a/nixos/hosts/hedgedoc/configuration.nix +++ b/nixos/hosts/hedgedoc/configuration.nix @@ -77,10 +77,20 @@ in accessKey = "$MINIO_ACCESS_KEY"; secretKey = "$MINIO_SECRET_KEY"; }; - # github = { - # clientID = "$GITHUB_CLIENTID"; - # clientSecret = "$GITHUB_CLIENTSECRET"; - # }; + email = true; + oauth2 = let url = "https://id.0x76.dev"; in + { + providerName = "authentik"; + clientID = "$AUTHENTIK_CLIENTID"; + clientSecret = "$AUTHENTIK_CLIENTSECRET"; + scope = "openid email profile"; + userProfileURL = "${url}/application/o/userinfo/"; + tokenURL = "${url}/application/o/token/"; + authorizationURL = "${url}/application/o/authorize/"; + userProfileUsernameAttr = "preferred_username"; + userProfileDisplayNameAttr = "name"; + userProfileEmailAttr = "email"; + }; }; }; }