Facebook OAuth issue Dreamfactory -


i getting error while trying implement facebook oauth in ionic app.

this how post request url looks like:

https://df-apiurl.com/api/v2/user/session?oauth_callback=true&service=facebook&code=**********&state=********

here error response. relevant part might be:

"message":"client error: post https://graph.facebook.com/oauth/access_token resulted in 400 bad request response:\n{"error":{"message":"error validating verification code. please make sure redirect_uri identical 1 (truncated...)\n"

but here full error message in case.

{"error":{"context":null,"message":"client error: post https://graph.facebook.com/oauth/access_token resulted in 400 bad request response:\n{"error":{"message":"error validating verification code. please make sure redirect_uri identical 1 (truncated...)\n","code":400,"trace":["0 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/guzzle/src/middleware.php(65): guzzlehttp\exception\requestexception::create(object(guzzlehttp\psr7\request), object(guzzlehttp\psr7\response))","1 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/promises/src/promise.php(203): guzzlehttp\middleware::guzzlehttp\{closure}(object(guzzlehttp\psr7\response))","2 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/promises/src/promise.php(156): guzzlehttp\promise\promise::callhandler(1, object(guzzlehttp\psr7\response), array)","3 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/promises/src/taskqueue.php(61): guzzlehttp\promise\promise::guzzlehttp\promise\{closure}()","4 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/promises/src/promise.php(246): guzzlehttp\promise\taskqueue->run(true)","5 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/promises/src/promise.php(223): guzzlehttp\promise\promise->invokewaitfn()","6 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/promises/src/promise.php(266): guzzlehttp\promise\promise->waitifpending()","7 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/promises/src/promise.php(225): guzzlehttp\promise\promise->invokewaitlist()","8 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/promises/src/promise.php(62): guzzlehttp\promise\promise->waitifpending()","9 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/guzzle/src/client.php(129): guzzlehttp\promise\promise->wait()","10 /opt/bitnami/apps/dreamfactory/htdocs/vendor/guzzlehttp/guzzle/src/client.php(87): guzzlehttp\client->request('post', 'https://graph.f...', array)","11 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/socialite/src/two/facebookprovider.php(77): guzzlehttp\client->__call('post', array)","12 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/socialite/src/two/facebookprovider.php(77): guzzlehttp\client->post('https://graph.f...', array)","13 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/socialite/src/two/abstractprovider.php(202): laravel\socialite\two\facebookprovider->getaccesstokenresponse('aqb6vh4zhq1oyqn...')","14 /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-oauth/src/services/baseoauthservice.php(91): laravel\socialite\two\abstractprovider->user()","15 /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/resources/usersessionresource.php(86): dreamfactory\core\oauth\services\baseoauthservice->handleoauthcallback()","16 [internal function]: dreamfactory\core\resources\usersessionresource->handlepost()","17 /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/components/resthandler.php(267): call_user_func(array)","18 /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/components/resthandler.php(173): dreamfactory\core\components\resthandler->processrequest()","19 /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/components/resthandler.php(220): dreamfactory\core\components\resthandler->handlerequest(object(dreamfactory\core\utility\servicerequest), '')","20 /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/components/resthandler.php(168): dreamfactory\core\components\resthandler->handleresource(array)","21 /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/services/baserestservice.php(74): dreamfactory\core\components\resthandler->handlerequest(object(dreamfactory\core\utility\servicerequest), 'session')","22 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17036): dreamfactory\core\services\baserestservice->handlerequest(object(dreamfactory\core\utility\servicerequest), 'session')","23 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17008): dreamfactory\http\controllers\restcontroller->handleservice('v2', 'user', 'session')","24 [internal function]: dreamfactory\http\controllers\restcontroller->handlepost('v2', 'user', 'session')","25 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9093): call_user_func_array(array, array)","26 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9155): illuminate\routing\controller->callaction('handlepost', array)","27 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9135): illuminate\routing\controllerdispatcher->call(object(dreamfactory\http\controllers\restcontroller), object(illuminate\routing\route), 'handlepost')","28 [internal function]: illuminate\routing\controllerdispatcher->illuminate\routing\{closure}(object(illuminate\http\request))","29 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(52): call_user_func(object(closure), object(illuminate\http\request))","30 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17209): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","31 [internal function]: dreamfactory\http\middleware\accesscheck->handle(object(illuminate\http\request), object(closure))","32 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","33 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","34 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","35 [internal function]: illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","36 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9612): call_user_func(object(closure), object(illuminate\http\request))","37 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9136): illuminate\pipeline\pipeline->then(object(closure))","38 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9123): illuminate\routing\controllerdispatcher->callwithinstack(object(dreamfactory\http\controllers\restcontroller), object(illuminate\routing\route), object(illuminate\http\request), 'handlepost')","39 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8191): illuminate\routing\controllerdispatcher->dispatch(object(illuminate\routing\route), object(illuminate\http\request), 'dreamfactory\\ht...', 'handlepost')","40 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8178): illuminate\routing\route->runcontroller(object(illuminate\http\request))","41 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7892): illuminate\routing\route->run(object(illuminate\http\request))","42 [internal function]: illuminate\routing\router->illuminate\routing\{closure}(object(illuminate\http\request))","43 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(52): call_user_func(object(closure), object(illuminate\http\request))","44 [internal function]: illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","45 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9612): call_user_func(object(closure), object(illuminate\http\request))","46 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7893): illuminate\pipeline\pipeline->then(object(closure))","47 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7884): illuminate\routing\router->runroutewithinstack(object(illuminate\routing\route), object(illuminate\http\request))","48 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7874): illuminate\routing\router->dispatchtoroute(object(illuminate\http\request))","49 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2416): illuminate\routing\router->dispatch(object(illuminate\http\request))","50 [internal function]: illuminate\foundation\http\kernel->illuminate\foundation\http\{closure}(object(illuminate\http\request))","51 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(52): call_user_func(object(closure), object(illuminate\http\request))","52 /opt/bitnami/apps/dreamfactory/htdocs/app/http/middleware/authcheck.php(178): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","53 [internal function]: dreamfactory\http\middleware\authcheck->handle(object(illuminate\http\request), object(closure))","54 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","55 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","56 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","57 /opt/bitnami/apps/dreamfactory/htdocs/vendor/barryvdh/laravel-cors/src/handlecors.php(42): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","58 [internal function]: barryvdh\cors\handlecors->handle(object(illuminate\http\request), object(closure))","59 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","60 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","61 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","62 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17306): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","63 [internal function]: dreamfactory\http\middleware\firstusercheck->handle(object(illuminate\http\request), object(closure))","64 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","65 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","66 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","67 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(13076): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","68 [internal function]: illuminate\view\middleware\shareerrorsfromsession->handle(object(illuminate\http\request), object(closure))","69 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","70 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","71 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","72 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(11622): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","73 [internal function]: illuminate\session\middleware\startsession->handle(object(illuminate\http\request), object(closure))","74 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","75 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","76 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","77 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12815): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","78 [internal function]: illuminate\cookie\middleware\addqueuedcookiestoresponse->handle(object(illuminate\http\request), object(closure))","79 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","80 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","81 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","82 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12752): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","83 [internal function]: illuminate\cookie\middleware\encryptcookies->handle(object(illuminate\http\request), object(closure))","84 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","85 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","86 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","87 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(3271): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","88 [internal function]: illuminate\foundation\http\middleware\checkformaintenancemode->handle(object(illuminate\http\request), object(closure))","89 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(array, array)","90 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request))","91 /opt/bitnami/apps/dreamfactory/htdocs/vendor/laravel/framework/src/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request))","92 [internal function]: illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request))","93 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9612): call_user_func(object(closure), object(illuminate\http\request))","94 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2363): illuminate\pipeline\pipeline->then(object(closure))","95 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2347): illuminate\foundation\http\kernel->sendrequestthroughrouter(object(illuminate\http\request))","96 /opt/bitnami/apps/dreamfactory/htdocs/public/index.php(53): illuminate\foundation\http\kernel->handle(object(illuminate\http\request))","97 {main}"]}}

i solved issue in case answer here:

http://community.dreamfactory.com/t/oauth-services-dont-work/2740

in case else comes across similar issue, please try adding following in both dreamfactory oauth service redirect url , facebook redirect url:

http://my_domain/dreamfactory/dist/index.html?service=facebook


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -