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

💡 [REQUEST] - Add option to replace history instead of add to it #210

Open
getsnoopy opened this issue Jan 26, 2025 · 2 comments
Open
Labels
question Further information is requested

Comments

@getsnoopy
Copy link
Contributor

getsnoopy commented Jan 26, 2025

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

@getsnoopy getsnoopy added the question Further information is requested label Jan 26, 2025
@sebastianvitterso
Copy link
Collaborator

@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? 😄

@soofstad
Copy link
Owner

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 👍

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

No branches or pull requests

3 participants