Fix auth environment type; GitLab audience optional

Signed-off-by: Tim Hansen <timbonicus@gmail.com>
This commit is contained in:
Tim Hansen
2021-03-24 15:47:17 -06:00
parent c0c0e30924
commit 67f66c2962
2 changed files with 10 additions and 10 deletions
+9 -9
View File
@@ -36,13 +36,13 @@ export interface Config {
*/
providers?: {
google?: {
development: { [key: string]: string };
[authEnv: string]: { [key: string]: string };
};
github?: {
development: { [key: string]: string };
[authEnv: string]: { [key: string]: string };
};
gitlab?: {
development: { [key: string]: string };
[authEnv: string]: { [key: string]: string };
};
saml?: {
entryPoint: string;
@@ -55,10 +55,10 @@ export interface Config {
digestAlgorithm?: string;
};
okta?: {
development: { [key: string]: string };
[authEnv: string]: { [key: string]: string };
};
oauth2?: {
development: {
[authEnv: string]: {
clientId: string;
clientSecret: string;
authorizationUrl: string;
@@ -67,16 +67,16 @@ export interface Config {
};
};
oidc?: {
development: { [key: string]: string };
[authEnv: string]: { [key: string]: string };
};
auth0?: {
development: { [key: string]: string };
[authEnv: string]: { [key: string]: string };
};
microsoft?: {
development: { [key: string]: string };
[authEnv: string]: { [key: string]: string };
};
onelogin?: {
development: { [key: string]: string };
[authEnv: string]: { [key: string]: string };
};
awsalb?: {
issuer?: string;
@@ -122,7 +122,7 @@ export const createGitlabProvider = (
OAuthEnvironmentHandler.mapConfig(config, envConfig => {
const clientId = envConfig.getString('clientId');
const clientSecret = envConfig.getString('clientSecret');
const audience = envConfig.getString('audience');
const audience = envConfig.getOptionalString('audience');
const baseUrl = audience || 'https://gitlab.com';
const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`;