Skip to content

Commit

Permalink
fix(Login): add default domain for SSO redirect cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanaturner committed Mar 3, 2023
1 parent acb0bab commit 3a6fb08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/components/auth/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const Login = () => {

const initSSOLogin = () => {
if (import.meta.env.VITE_MODE === 'production') {
let domains = String(import.meta.env.VITE_PRODUCTION_URLS).split(',');
const domains = import.meta.env.VITE_PRODUCTION_URLS ? import.meta.env.VITE_PRODUCTION_URLS.split(',') : ['libretexts.org'];
Cookies.set('conductor_sso_redirect', window.location.protocol + "//" + window.location.hostname, { domain: domains[0], sameSite: 'lax'});
} else {
Cookies.set('conductor_sso_redirect', window.location.hostname, { domain: 'localhost', sameSite: 'lax'});
Expand Down

0 comments on commit 3a6fb08

Please sign in to comment.