about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/templates/goapp
diff options
context:
space:
mode:
authorEmile <git@emile.space>2025-02-19 19:53:25 +0100
committerEmile <git@emile.space>2025-02-19 19:53:25 +0100
commitae39f02812bcfe903e956220c890bfb7b9bb9ff4 (patch)
treedff7028627665a7d2cb7cd64533ac74ec8919379 /nix/hosts/corrino/www/templates/goapp
parent07425c679f7399284c0fe3dcbee54f45b23d07a0 (diff)
removed the backend, added the frontend with oidc support
So I've added oidc support which is nice, yet I have to test this
with some https foo, so I'm pushing this.
Diffstat (limited to 'nix/hosts/corrino/www/templates/goapp')
-rw-r--r--nix/hosts/corrino/www/templates/goapp/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nix/hosts/corrino/www/templates/goapp/default.nix b/nix/hosts/corrino/www/templates/goapp/default.nix
new file mode 100644
index 0000000..716d6ab
--- /dev/null
+++ b/nix/hosts/corrino/www/templates/goapp/default.nix
@@ -0,0 +1,30 @@
+
+{
+  services.authelia.instances.main.settings.identity_providers.oidc.clients = [
+    {
+      id = "goapp";
+
+      # ; nix run nixpkgs#authelia -- crypto hash generate pbkdf2 --variant sha512 --random --random.length 72 --random.charset rfc3986
+      secret = "$pbkdf2-sha512$310000$WUai4pp1ZVJDrJ8j6ICLiQ$NOMMaCZ3gt.x.a09MWatMkJWQIaH0QeWgRXSbuD2iWRwR.N6MWmJA6QO.LIKcxn6l.zHZN4bO1Ztsrbo9010Tw";
+      public = false;
+      authorization_policy = "two_factor";
+      redirect_uris = [ "https://127.0.0.1:8080/auth/oauth2/callback" ];
+      scopes = [
+        "openid"
+        "email"
+        "profile"
+      ];
+      grant_types = [
+        "refresh_token"
+        "authorization_code"
+      ];
+      response_types = [ "code" ];
+      response_modes = [
+        "form_post"
+        "query"
+        "fragment"
+      ];
+      token_endpoint_auth_method = "client_secret_post";
+    }
+  ];
+}