feat(loginWithRedirect): add redirectMethod option #717
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 usewindow.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 paramredirectMethod
tologinWithRedirect
.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.
Checklist
master