-
-
Notifications
You must be signed in to change notification settings - Fork 204
oauth2 logins do not work #587
Comments
Is this same error popping up for every oAuth provider? Or just google? |
twitter does not work at all but i think this is using oauth1... |
I get the same error on 7.07. I had opened this issue but I guess you were able to connect somehow so it was closed. https://github.com/directus/app/issues/1113 {"error":{"code":null,"message":"Call to undefined method League\OAuth2\Client\Provider\Exception\IdentityProviderException::getErrorCode()","class":"Error","file":"/home/drivve5/public_html/directus/src/endpoints/Auth.php","line":233}} |
@srjrol that was another error message though. The good news is that you both have the same error. The bad news is is that it's actually working as expected for me 🧐 |
i checked the code... so far i can tell, there is a bug in the catch block... so before calling getErrorCode https://github.com/directus/api/blob/94269268bec54fbfb8f994010d3114800bf91c2b/src/endpoints/Auth.php#L233
|
I updated the code to make sure to call @zyclonite you can now check the master branch to see if this change at least give you the correct error. |
@wellingguzman yes that helps logging this errors (if not thrown) would be really important... in my case i had google+ api not enabled, so auth was failing but i could not figure out why... as google+ will be closed down in the near future, i guess the api and scope will be gone as well... |
@zyclonite interesting, I will check this out, I will improve the auth configuration to allow user to set options that can be passed to the dependency, so In the meantime, If someone want to jump in a fix/implement this in a PR that will be great (and I can help them). At the moment we only want to use |
As it was brought to our attention by @zyclonite, by default the Google OAuth provider library uses the Google+ API. You should either enable the Google+ API or set In Summary:
|
@wellingguzman tested oidc mode with version 2.0.11, works great, thank you |
Bug Report
Steps to Reproduce
configure google as oauth2 provider and login
Expected Behavior
working login
Actual Behavior
when the auth code is received on the api (
/auth/sso/google/callback
) it throws an internal server error with the following log statementError: Call to undefined method League\OAuth2\Client\Provider\Exception\IdentityProviderException::getErrorCode() in /var/www/html/src/endpoints/Auth.php:233
Other Context & Screenshots
Technical Details
The text was updated successfully, but these errors were encountered: