feat: HedgeDoc module(#168)

Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config/pulls/168
Reviewed-by: Inex Code <inex.code@selfprivacy.org>
Co-authored-by: Thary <thary@riseup.net>
Co-committed-by: Thary <thary@riseup.net>
This commit is contained in:
2025-09-05 15:33:30 +03:00
committed by Inex Code
parent 73cbdf994e
commit 45c96d3472
5 changed files with 255 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/lib/web/auth/oauth2/index.js b/lib/web/auth/oauth2/index.js
index b0ffa5e8a..01e16e152 100644
--- a/lib/web/auth/oauth2/index.js
+++ b/lib/web/auth/oauth2/index.js
@@ -134,7 +134,7 @@ passport.use(new OAuth2CustomStrategy({
authorizationURL: config.oauth2.authorizationURL,
tokenURL: config.oauth2.tokenURL,
clientID: config.oauth2.clientID,
- clientSecret: config.oauth2.clientSecret,
+ clientSecret: require("fs").readFileSync(config.oauth2.clientSecret, 'utf8').split("\n")[0],
callbackURL: config.serverURL + '/auth/oauth2/callback',
userProfileURL: config.oauth2.userProfileURL,
scope: config.oauth2.scope,