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: returnUrl from back end was being discarded #1807

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GBirkel
Copy link

@GBirkel GBirkel commented Apr 3, 2025

Description

The "returnUrl" value passed to/from the back end was being ignored at the end of the journey. These minor changes detect a "returnUrl" that's part of a successful OIDC login from the v4 back end, and use the value in subsequent navigation after the login page.

Motivation

Together with the changes in SciCatProject/scicat-backend-next#1815 , this makes "returnUrl" work as designed.

Fixes / Changes:

Detecting and extracting "returnUrl" in a successful OIDC redirect. Using "returnUrl" in place of "returnURL" for consistency.

Tests included

Tests pass as before.

Documentation

No documentation changes needed.

Backend version

No specific back end is mandatory, but for "returnUrl" to fully work, the changes in SciCatProject/scicat-backend-next#1815 should be integrated as well.

Summary by Sourcery

Improve handling of returnUrl during OIDC authentication to ensure consistent redirect behavior across different backend versions

Bug Fixes:

  • Fixed discarding of returnUrl during OIDC login process, ensuring users are redirected to the correct page after authentication

Enhancements:

  • Updated returnUrl handling to support both backend v3 and v4 authentication flows
  • Standardized returnUrl parameter naming across components

GBirkel and others added 3 commits April 3, 2025 12:32
feat: improve dynamic dataset detail view (SciCatProject#1805)
…racted and used. Instead, a value of "returnUrl" was being set using front end browsing history.
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @GBirkel - I've reviewed your changes - here's some feedback:

Overall Comments:

  • It might be clearer to use a constant for the query parameter name returnUrl to avoid typos and improve maintainability.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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

Successfully merging this pull request may close these issues.

1 participant