make saml provider path from globalConfig (#2855)

Co-authored-by: JShamsul <jshamsul@grabtaxi.com>
This commit is contained in:
J Shamsul Bahri
2020-10-12 18:11:28 +08:00
committed by GitHub
parent c4dde76af1
commit 79340e44b4
@@ -118,15 +118,18 @@ type SAMLProviderOptions = {
};
export const createSamlProvider: AuthProviderFactory = ({
globalConfig,
config,
tokenIssuer,
}) => {
const url = new URL(globalConfig.baseUrl);
const providerId = 'saml';
const entryPoint = config.getString('entryPoint');
const issuer = config.getString('issuer');
const opts = {
entryPoint,
issuer,
path: '/auth/saml/handler/frame',
path: `${url.pathname}/${providerId}/handler/frame`,
tokenIssuer,
};