This commit is contained in:
2025-09-11 17:50:36 +03:00
parent c635a33654
commit 6d1f369dc0
2 changed files with 3 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
[ [
[ "selfprivacy", "domain" ], [ "selfprivacy", "domain" ],
[ "selfprivacy", "modules", "auth", "enable" ], [ "selfprivacy", "modules", "auth", "enable" ],
[ "selfprivacy", "modules", "hedgedoc" ], [ "selfprivacy", "modules", "mastodon" ],
[ "selfprivacy", "passthru", "auth", "mkOAuth2ClientSecretFP" ], [ "selfprivacy", "passthru", "auth", "mkOAuth2ClientSecretFP" ],
[ "selfprivacy", "passthru", "auth", "oauth2-discovery-url" ], [ "selfprivacy", "passthru", "auth", "oauth2-discovery-url" ],
[ "selfprivacy", "passthru", "auth", "oauth2-provider-name" ], [ "selfprivacy", "passthru", "auth", "oauth2-provider-name" ],

View File

@@ -12,8 +12,8 @@ let
oauthDiscoveryURL = config.services.kanidm.serverSettings.origin; oauthDiscoveryURL = config.services.kanidm.serverSettings.origin;
issuer = lib.strings.removeSuffix "/.well-known/openid-configuration" oauthDiscoveryURL; issuer = lib.strings.removeSuffix "/.well-known/openid-configuration" oauthDiscoveryURL;
# SelfPrivacy uses SP Module ID to identify the group!
usersGroup = "sp.mastodon.users"; usersGroup = "sp.mastodon.users";
adminGroup = "sp.mastodon.admins";
oauthClientSecretFP = auth-passthru.mkOAuth2ClientSecretFP oauthClientID; oauthClientSecretFP = auth-passthru.mkOAuth2ClientSecretFP oauthClientID;
oauthRedirectURL = "https://${cfg.subdomain}.${sp.domain}/auth/auth/openid_connect/callback"; oauthRedirectURL = "https://${cfg.subdomain}.${sp.domain}/auth/auth/openid_connect/callback";
@@ -119,6 +119,7 @@ in
selfprivacy.auth.clients.${oauthClientID} = { selfprivacy.auth.clients.${oauthClientID} = {
inherit usersGroup; inherit usersGroup;
inherit adminGroup;
subdomain = cfg.subdomain; subdomain = cfg.subdomain;
originLanding = "https://${cfg.subdomain}.${sp.domain}/"; originLanding = "https://${cfg.subdomain}.${sp.domain}/";
originUrl = oauthRedirectURL; originUrl = oauthRedirectURL;