💡 [REQUEST] - Add option to replace history instead of add to it
Summary
Currently, the logIn function, via the redirectToLogin function, always creates a new history entry because it uses window.location.assign. In some cases, we want to to be able to replace the history entry when redirecting to the login URL, so allowing this to be changed on a case-by-case basis would be nice.
Basic Example
Since it seems like the method parameter already exists, perhaps a new value for it can be used to accomplish this...something like replaced-redirect or ghost-redirect:
logIn('state', null, 'replaced-redirect');
Drawbacks
None.
Unresolved questions
No response
Implementation PR
No response
Reference Issues
No response
@soofstad Ultimately your decision, but I can see this being something users could want.
@getsnoopy Would you try making a PR so we can see the idea in action? 😄
Yeah we had this at one point. Considered it a bug and changed it 😄 But sure, we can make it configurable! I'd welcome a PR on this 👍
Stale issue message
Sounds good; I'll whip something up and push it
Created it; please take a look