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

Feature Request: Redirecting to url even when logged in #24

Open
rarog opened this issue Jun 18, 2021 · 6 comments
Open

Feature Request: Redirecting to url even when logged in #24

rarog opened this issue Jun 18, 2021 · 6 comments
Labels
awaiting author Awaiting for the author to respond enhancement New feature or request

Comments

@rarog
Copy link
Contributor

rarog commented Jun 18, 2021

Current behaviour is that the redirection is done on login. Let's say I have n tabs, where I'm logged in, if I open all n of them after logout, I get a login screen with redirection parameter. If I log in in one of the tabs, I'll be redirected to the url in the parameter. All the other n-1 tabs will be redirected to the default url and the original url in the redirection parameter is "lost".

If this is interesting and useful to other people, I could start working on it.

@visto9259
Copy link
Member

@rarog I know this is way late to respond to this.

Is this still something that is requested? Did you work on a solution of you own?

@visto9259 visto9259 added enhancement New feature or request awaiting author Awaiting for the author to respond labels Jun 28, 2024
@rarog
Copy link
Contributor Author

rarog commented Jun 28, 2024

@visto9259 That's still something of interest and improvement of the behavior.
I never started working on it and shelved the idea for later and actually forgot about this.

@visto9259
Copy link
Member

visto9259 commented Jun 28, 2024

@rarog Where do you set the redirect param? In a guard or an event listener that checks if the user is logged in? Or in a controller that redirects when the user is not logged in?

@rarog
Copy link
Contributor Author

rarog commented Jun 29, 2024

The controller AFAIR, which "stores" the url as GET parameter in the url. use_redirect_parameter_if_present setting is it.

@visto9259
Copy link
Member

Let me just make sure I understand the flow of your use case.
You have n tabs opened, all logged in. You logged out in one of them. You reopen all n tabs and you app redirect all n tabs to login with a redirect to the original page.

You log back in in one tab which gets redirected to the original page.

On the other tabs, what action do you do? You log in again?

The login action will redirect to the default route defined in the options if the user is already logged in. It ignores the redirect parameter. This is probably the issue you have.

It should be an easy fix to use the redirect parameter if set and if configured to be used.

@rarog
Copy link
Contributor Author

rarog commented Jun 29, 2024

Yes, that's the exact description of the scenario for the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting author Awaiting for the author to respond enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants