Skip to content

[RFC][Security] Switch user redirection dynamic #53645

Closed
@94noni

Description

@94noni

Description

I've in the past needed a generic user switch so I implemented it at config level
Now I find myself I need it at runtime level, specific per user switch execution

right now I have an hack solution, kind of making work it but not perfect

RFC: would it make sens to implement such logic in the Symfony core directly? (in event + listener)

For ex in

$response = new RedirectResponse($this->urlGenerator && $this->targetRoute ? $this->urlGenerator->generate($this->targetRoute) : $request->getUri(), 302);
, adding in priority a method call that can read such new redirectPath from the switch user event for example

Of course I will contribute it if it is valuable

Thank you


Actual code I have/trying: maybe store data in session and catch it on user switch finish and redirect on it

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions