Update line  #30 at OauthComponent.php

If your application runs in a subdomain (example.com/mycms/), you have a problem after authorization with the correct redirect back. In this situation, '$controller->request->here' returns the path that creates the wrong redirect url (example.com/mycms/mycms/ ...). It seems to me that the use CakeRequest::referer () is better solution.