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

feat(loginWithRedirect): add redirectMethod option #717

Conversation

slaywell
Copy link
Contributor

@slaywell slaywell commented Mar 5, 2021

Description

As per this closed issue where a PR contribution was suggested, we have a similar requirement (i.e. not to allow users to use 'browser back' to go back to a page where loginWithRedirect was called - and want to use window.location.replace to achieve this).

References

Add support for redirect with window.replace instead of window.assign #183

Testing

I have tested locally using npm link passing the new param redirectMethod to loginWithRedirect.
I have ensured that this param is not passed to the buildAuthorizeUrl method as we don't need it to be present as a search param on the Authorize URL.

I have added a new unit test for the change and verified that the existing unit tests pass without alteration indicating this is a non-breaking change.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@stevehobbsdev
Copy link
Contributor

Thanks for raising @slaywell, let us have a deep-dive into the PR this week, we'll come back to you shortly.

@stevehobbsdev stevehobbsdev added enhancement An enhancement or improvement to the SDK that could not be otherwise categorized as a new feature review:small Small review labels Mar 10, 2021
@stevehobbsdev
Copy link
Contributor

All looks good @slaywell, thanks. Just attempting to fix build issues before we merge and release 🎉

@stevehobbsdev stevehobbsdev added this to the vNext milestone Mar 22, 2021
@stevehobbsdev stevehobbsdev merged commit c2dd91e into auth0:master Mar 22, 2021
@stevehobbsdev stevehobbsdev added the CH: Added PR is adding feature or functionality label Mar 22, 2021
@stevehobbsdev stevehobbsdev mentioned this pull request Mar 22, 2021
@slaywell slaywell deleted the add-redirectmethod-config-to-loginwithredirect branch March 23, 2021 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Added PR is adding feature or functionality enhancement An enhancement or improvement to the SDK that could not be otherwise categorized as a new feature review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for redirect with window.replace instead of window.assign
2 participants