Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Auth): improve redirect logic #449

Merged
merged 1 commit into from
Feb 23, 2025
Merged

fix(Auth): improve redirect logic #449

merged 1 commit into from
Feb 23, 2025

Conversation

jakeaturner
Copy link
Collaborator

No description provided.

Copy link
Member

@ethanaturner ethanaturner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep the handling for campus instances.

process.env.CONDUCTOR_DOMAIN &&
process.env.CONDUCTOR_DOMAIN !== "commons.libretexts.org"
) {
const authRedirectURL = `${oidcCallbackProto}://${process.env.CONDUCTOR_DOMAIN}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how users are redirected to a campus instance after returning from CAS.

// Redirect user
let redirectURL = req.hostname;
if (req.cookies.conductor_auth_redirect) {
redirectURL = req.cookies.conductor_auth_redirect;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing

@jakeaturner jakeaturner merged commit 48b32c8 into master Feb 23, 2025
2 checks passed
@jakeaturner jakeaturner deleted the broken-redirect branch February 23, 2025 01:09
@libretexts-bot
Copy link
Collaborator

🎉 This PR is included in version 2.66.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants