hevelius / files_external_onedrive

:mega: :floppy_disk: External storage support for Microsoft OneDrive
GNU General Public License v2.0
73 stars 21 forks source link

League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_request #33

Open julienval opened 4 years ago

julienval commented 4 years ago

Hi,

I have followed the instructions ans set the correct permissions in Azure but still cannot connect to OneDrive. In my Nexctloud logs, here is what I see:

[index] Error: League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_request at <<closure>>

 0. /var/www/nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 628
    League\OAuth2\Client\Provider\GenericProvider->checkResponse(GuzzleHttp\Psr7\Response {}, {error: "invalid ... "})
 1. /var/www/nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 537
    League\OAuth2\Client\Provider\AbstractProvider->getParsedResponse(GuzzleHttp\Psr7\Request {})
 2. /var/www/nextcloud/apps/files_external_onedrive/lib/Controller/OauthController.php line 136
    League\OAuth2\Client\Provider\AbstractProvider->getAccessToken(League\OAuth2\Cl ... {}, {code: "M951063c ... "})
 3. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Files_external_onedrive\Controller\OauthController->receiveToken("0ed8cd58-fc9a-4ee1-8652-4eeaa97a6dc4", "gEKHcG=?ScAWvMCQqAxbpVurI1=Z=990", "https://cloud.k ... s", 2, "M951063c9-3308-abd8-e67b-a0b58ccf0ffa")
 4. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_extern ... {}, "receiveToken")
 5. /var/www/nextcloud/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_extern ... {}, "receiveToken")
 6. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Files_exte ... r", "receiveToken", OC\AppFramework\ ... {}, {_route: "files_ ... "})
 7. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "files_ ... "})
 8. /var/www/nextcloud/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {_route: "files_ ... "})
 9. /var/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/files_external_onedrive/oauth")
10. /var/www/nextcloud/index.php line 38
    OC::handleRequest()

POST /apps/files_external_onedrive/oauth
from 78.233.61.74 by julien at 2020-04-02T05:26:28+00:00

Any hint?

jkoopmann commented 4 years ago

I seem to be having a very similar problem. When I hit "Grant access" button I am redirected to MS. It then comes back to the nextcloud screen. It still shows the red exclamation mark and cannot be used. Logfile shows:

` [index] Error: League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_client at <>

  1. /usr/local/www/nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 628 League\OAuth2\Client\Provider\GenericProvider->checkResponse(GuzzleHttp\Psr7\Response {}, {error: "invalid ... "})
  2. /usr/local/www/nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 537 League\OAuth2\Client\Provider\AbstractProvider->getParsedResponse(GuzzleHttp\Psr7\Request {})
  3. /usr/local/www/nextcloud/apps/files_external_onedrive/lib/Controller/OauthController.php line 136 League\OAuth2\Client\Provider\AbstractProvider->getAccessToken(League\OAuth2\Cl ... {}, {code: "OAQABAAI ... "})
  4. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170 OCA\Files_external_onedrive\Controller\OauthController->receiveToken("8750cbf1-7096-4e05-a683-fc64d70ac7ba", "unmodified", "https://nextclo ... s", 2, "OAQABAAIAAAAm-0 ... A")
  5. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99 OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_extern ... {}, "receiveToken")
  6. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 125 OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_extern ... {}, "receiveToken")
  7. /usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47 OC\AppFramework\App::main("OCA\Files_exte ... r", "receiveToken", OC\AppFramework\ ... {}, {route: "files ... "})
  8. <> OC\AppFramework\Routing\RouteActionHandler->__invoke({route: "files ... "})
  9. /usr/local/www/nextcloud/lib/private/Route/Router.php line 299 call_user_func(OC\AppFramework\ ... {}, {route: "files ... "})
  10. /usr/local/www/nextcloud/lib/base.php line 1008 OC\Route\Router->match("/apps/files_external_onedrive/oauth")
    1. /usr/local/www/nextcloud/index.php line 38 OC::handleRequest()

POST /index.phps_external_onedrive/oauth from 192.168.202.224 by j.koopmann at 2020-05-04T13:20:57+00:00 `

This is on Nextcloud 18.0.4.

jkoopmann commented 4 years ago

Mine seems to be related to this

https://github.com/hevelius/files_external_onedrive/issues/34#issuecomment-622934706

lectergta commented 4 years ago

same problem here. are there any solutions yet?