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

Part 1: expose redirect URL from Apache Shiro back to React #778

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JasonWildMe
Copy link
Contributor

This PR allows a Wildbook URL to a secured endpoint to be entered and then redireted back to after login.

For example, /appadmin/dataIntegrity.jsp is secured, and a public request to it should be redirected to /react/login/ before returning the user to /appadmin/dataIntegrity.jsp.

PR fixes #675

Changes

  • Part 1: @JasonWildMe adds the "redirectURL" parameter to Login.java's returned JSON payload
  • Part 2: @erinz2020 ensures /react/login/ page does not make any calls to the backend Java
    • remove call to /Collaborate if user is not yet logged in. This interferes with our ability to get the redirect URL.
    • remove call to /UserGetNotifications if user is not yet logged in. This interferes with our ability to get the redirect URL.
  • Part 3: @erinz2020 If JSON payload response from Login includes a "redirectUrl" value (e.g., "/appadmin/dataIntegrity.jsp"), redirect to that URL.

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.

Add a React-compatible redirect after login utility
3 participants