phpwordpressyiigoogle-apihybridauth

Error 404 using HybridAuth with Google


I have a problem with an old site developed using YII 1.1.
Everything worked until some time ago (the site is rarely used) but now login the Google login doesn't work.
Specifically, I use the HybridAuth extension (guide https://www.yiiframework.com/wiki/459/integrating-hybridauth-directly-into-yii-withoutan-extension) but now it seems that the callback called up "socialLogin?hauth.done=Google" has a 404 not-found error.
Nothing has changed on the website and obviously the controller exists. The only thing that is changed is the parent site (YII is in a subdomain) has been completely renewed (It's a Wordpress). What can I check?
I did 3 really strange behavior:

  1. The first time, or if I have never given consent to use, the login works correctly. Next login failed (404).
  2. If i manually call the URL via browser (copy and paste URL) the callback a I remove the scope "https://www.googleapis.com/auth/userinfo.profile" I have no more 404 error.
  3. If I remove from URL only the word ".profile", for example https://www.googleapis.com/auth/userinfo.profil2, I have no 404 error.

Locally the site work fine, without any problem at the login.

What can I check on YII configuration or in wordpress configuration ?


Solution

  • I solve it.
    It was the .htaccess file of parent domain (Wordpress).
    I add this line:

    #BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_URI} !subdomain ##NEW LINE
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress