Don't hardcode issuer...

This commit is contained in:
niten 2023-09-13 10:54:24 -07:00
parent 87d72f6d15
commit 4b4586439d
1 changed files with 7 additions and 2 deletions

View File

@ -13,13 +13,13 @@ let
idp_id = cfg.openid.provider; idp_id = cfg.openid.provider;
idp_name = cfg.openid.provider; idp_name = cfg.openid.provider;
discover = true; discover = true;
issuer = "https://authentik.fudo.org/application/o/matrix/"; issuer = cfg.openid.issuer;
client_id = cfg.openid.client-id; client_id = cfg.openid.client-id;
client_secret = cfg.openid.client-secret; client_secret = cfg.openid.client-secret;
scopes = [ "openid" "profile" "email" ]; scopes = [ "openid" "profile" "email" ];
user_mapping_provider.config = { user_mapping_provider.config = {
localpart_template = "{{ user.preferred_username }}"; localpart_template = "{{ user.preferred_username }}";
display_name_template = "{{ user.name | capitalize }}"; display_name_template = "{{ user.name|capitalize }}";
}; };
}]; }];
}); });
@ -73,6 +73,11 @@ in {
type = str; type = str;
description = "OpenID Client Secret."; description = "OpenID Client Secret.";
}; };
issuer = mkOption {
type = str;
description = "OpenID issuer URL.";
};
}; };
}; };