Skip to content

Commit 13617cf

Browse files
committed
make curam redirect configurable
1 parent 06a9afb commit 13617cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pages/auth/login.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ export default function Login(props) {
3636
params.append('Lang', redirectLang)
3737
}
3838
const curamRedirect =
39-
props.ecasUrl +
40-
'/ecas-seca/rascl_iv/Curam/SAMLIdentityProvider.aspx?' +
41-
params.toString()
39+
props.ecasUrl + props.curamRedirect + params.toString()
4240
const redirectTarget = props.redirectQueryString
4341
? curamRedirect
4442
: props.locale === 'en'
@@ -77,6 +75,7 @@ export async function getServerSideProps({ req, res, locale, query }) {
7775
const session = await getServerSession(req, res, authOptions)
7876
const token = await getIdToken(req)
7977
const ecasUrl = process.env.AUTH_ECAS_BASE_URL
78+
const curamRedirect = process.env.AUTH_ECAS_CURAM_REDIRECT
8079
// TODO: Compare vs a whitelist
8180
const queryRedirect = query.link ? querystring.stringify(query) : ''
8281

@@ -145,6 +144,7 @@ export async function getServerSideProps({ req, res, locale, query }) {
145144
authDisabled: authDisabled ?? true,
146145
redirectQueryString: redirectQueryString,
147146
ecasUrl: ecasUrl,
147+
curamRedirect: curamRedirect,
148148
},
149149
}
150150
}

0 commit comments

Comments
 (0)