In my request, the user receives an email with the URL, as soon as he clicks, the user will be moved to the URL through the authentication process.
So, to redirect the user to the specified URL, I use the method mentioned here ( Transfer parameters when redirecting ), where I intend to pass the redirect URL as a parameter, for example
login_path: %accounts_host%/signin?redirect=%need_current_url_here%
within security.ymland fix as such $url=$_GET['redirect'];and ensure appropriate redirection.
My request is: how can I access the current url from security.ymlso that I can attach it to login_path.
I am new to this and any example / document is much appreciated. :)
PS
Authentication is performed in another symonfy2 application, after which I cannot use the command refererbecause it will be empty. This is why I am trying to pass you the redirect URL as a parameter. :)
source
share