add dex to hedgedoc
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Vivian 2023-05-05 12:58:00 +02:00
parent bb38cadb11
commit 9ac736868b
2 changed files with 24 additions and 5 deletions

View file

@ -64,10 +64,10 @@ in {
staticClients = [ staticClients = [
{ {
id = "outline"; id = "outline";
name = "Outline"; name = "Outline";
redirectURIs = [ "https://outline.0x76.dev/auth/oidc.callback" ]; redirectURIs = [ "https://outline.0x76.dev/auth/oidc.callback" ];
secretEnv = "OUTLINE_CLIENT_SECRET"; secretEnv = "OUTLINE_CLIENT_SECRET";
} }
{ {
id = "grafana"; id = "grafana";
@ -75,6 +75,12 @@ in {
redirectURIs = [ "https://grafana.0x76.dev/login/generic_oauth" ]; redirectURIs = [ "https://grafana.0x76.dev/login/generic_oauth" ];
secretEnv = "GRAFANA_CLIENT_SECRET"; secretEnv = "GRAFANA_CLIENT_SECRET";
} }
{
id = "hedgedoc";
name = "Hedgedoc";
redirectURIs = [ "https://md.0x76.dev/auth/oauth2/callback" ];
secretEnv = "HEDGEDOC_CLIENT_SECRET";
}
]; ];
}; };

View file

@ -66,7 +66,20 @@ in {
accessKey = "$MINIO_ACCESS_KEY"; accessKey = "$MINIO_ACCESS_KEY";
secretKey = "$MINIO_SECRET_KEY"; secretKey = "$MINIO_SECRET_KEY";
}; };
email = true; email = false;
oauth2 = let url = "https://dex.0x76.dev";
in {
providerName = "Dex";
clientID = "hedgedoc";
clientSecret = "$DEX_CLIENT_SECRET";
scope = "openid email profile";
authorizationURL = "${url}/auth";
tokenURL = "${url}/token";
userProfileURL = "${url}/userinfo";
userProfileUsernameAttr = "preferred_username";
userProfileDisplayNameAttr = "name";
userProfileEmailAttr = "email";
};
}; };
}; };
} }