aboutsummaryrefslogtreecommitdiffstats
path: root/lib/config.ts
blob: ef86cb5a8a9d6231de5c2d25710881b9d62bf6ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;