In my requirement, a user receives an email with a url, once he clicks the user will be navigated to the url via an authentication process.
So to redirect the user to the clicked url I am using the method mentioned here ( Pass parameters when redirect ) where I intend to pass the redirect url as parameter like
login_path: %accounts_host%/signin?redirect=%need_current_url_here%
within the security.yml
and capture as such $url=$_GET['redirect'];
and provide the redirection accordingly.
My query is how can I access the current url from within the security.yml
so that I can attach it to the login_path
.
I am quite new to this and any example/ document is very much appreciated. :)
PS
The authentication is done within another symonfy2 application at which point, I cant use referer
command as it will be null. That is why I am trying to pass thee redirect url as a parameter. :)