diff options
| author | MohamedBassem <me@mbassem.com> | 2024-02-06 12:26:29 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-02-06 12:26:29 +0000 |
| commit | 083ea5bd19172381bb53e95aaf98eaabef839c54 (patch) | |
| tree | 4d1c041aab7cd8d15382330db08caeb9c5a12c63 /web/lib/config.ts | |
| parent | b792121977ade8bdd3fb62704b65a9fcbd1436b9 (diff) | |
| download | karakeep-083ea5bd19172381bb53e95aaf98eaabef839c54.tar.zst | |
Move the web app into a subdir
Diffstat (limited to 'web/lib/config.ts')
| -rw-r--r-- | web/lib/config.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/web/lib/config.ts b/web/lib/config.ts new file mode 100644 index 00000000..ef86cb5a --- /dev/null +++ b/web/lib/config.ts @@ -0,0 +1,20 @@ +function buildAuthentikConfig() { + let {id, secret, issuer} = process.env; + if (!id || !secret || !issuer) { + return undefined; + } + + return { + clientId: id, + clientSecret: secret, + issuer: issuer, + }; +} + +const serverConfig = { + auth: { + authentik: buildAuthentikConfig(), + } +}; + +export default serverConfig; |
