Hi, just wondering if I need to set the return url to use Yii::app->user->returnUrl, or maybe some additional configuration in main.php? When I try to access Yii::app->user->returnUrl I am given the base url. For example, http://localhost/testdrive/index.php/ with out any controller/action or variables specified.
One last clarification is that return URL is only set when you request some page and it fails the authentication then after authentication it return backs to that page who causes failure.
If the browser is redirected to the login page and the login is successful, we may want to redirect the browser back to the page that caused the authorization failure. How do we know the URL for that page? We can get this information from the returnUrl property of the user component. We can thus do the following to perform the redirection: