Closed price2b closed 5 years ago
Hi Sebastian,
Have you created the .env
file and put in your eBay credentials?
https://developer.ebay.com/api-docs/static/oauth-credentials.html
Hi Micha, yes
At this moment accessing welcome.blade.php displays the ebayauthlogin, I press-> log into developer area -> displays "grant authorization area" perfectly and then a code is retrieved (as I can see on the url).
But in that moment the error appears. I dont understand why
full log
[2019-07-07 22:48:30] local.ERROR: clientId and clientSecret are required for http basic auth {"exception":"[object] (InvalidArgumentException(code: 0): clientId and clientSecret are required for http basic auth at /Applications/MAMP/htdocs/fiverr/vendor/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php:31)
[stacktrace]
#0 /Applications/MAMP/htdocs/fiverr/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(512): League\\OAuth2\\Client\\OptionProvider\\HttpBasicAuthOptionProvider->getAccessTokenOptions('POST', Array)
#1 /Applications/MAMP/htdocs/fiverr/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(536): League\\OAuth2\\Client\\Provider\\AbstractProvider->getAccessTokenRequest(Array)
#2 /Applications/MAMP/htdocs/fiverr/app/Http/Controllers/ebayOauthLogin.php(158): League\\OAuth2\\Client\\Provider\\AbstractProvider->getAccessToken(Object(League\\OAuth2\\Client\\Grant\\AuthorizationCode), Array)
#3 [internal function]: App\\Http\\Controllers\\ebayOauthLogin->welcome(Object(Illuminate\\Http\\Request))
#4 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#5 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('welcome', Array)
#6 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\ebayOauthLogin), 'welcome')
#7 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
#8 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Router.php(682): Illuminate\\Routing\\Route->run()
#9 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#10 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#11 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#12 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#13 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(75): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#14 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#15 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#16 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#17 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#18 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#19 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#20 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#21 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#22 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#23 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#24 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#25 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#26 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#27 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#28 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#29 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Router.php(684): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#30 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Router.php(659): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#31 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#32 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Router.php(614): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#33 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#34 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#35 /Applications/MAMP/htdocs/fiverr/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#36 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#37 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#38 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#39 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#40 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#41 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#42 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#43 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#44 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#45 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#46 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#47 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#48 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#49 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#50 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#51 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#52 /Applications/MAMP/htdocs/fiverr/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#53 /Applications/MAMP/htdocs/fiverr/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#54 {main}
"}
please goto vendor/league/oauth2-client/src/Provider/AbstractProvider.php
and put a dump here:
also add a dump here:
app/Http/Controllers/ebayOauthLogin.php
let´s see what you have. in case the params are filled, please deface the security related stuff.
Thank you for your help. I placed the code but no change. below you will see the type of error I receive.
Sebastián
so the throw seems to block the regular output (of the dump) you should replace this "throw" with a simple exit, then we hopefully should see the dumps.
Excellent, now I have information. I made an error passing values from CERT_ID consequently ClientSecret was empty.
Sir I have a bounty opened at https://stackoverflow.com/questions/56827786/how-to-generate-ebay-oauth-user-token for 50 points and honestly you code solved all my doubts. please post a brief answer referencing your code so I can grant the bounty to you!.
thank you so much for you code and your dedication answering me. Brgds
.
glad to help. thanks for the notice about the bounty, but davids SDK is dead over a year now. people do not realize, they can easily create their own SDK, because there exists so great code generators: see my example: https://github.com/michabbb/php-ebay-sdk
thank you @michabbb I will check your code. Some of us are not so skilled in programming consequently we rely heavily on other people SDK's... and in my experience oauth + ebay increase its complexity when you work with users tokens.
thank you so much!!
@price2b in case you need prof help, feel free to contact me anytime 😏
Of Course!, thank you
Sebastián Herrera
El lun., 8 jul. 2019 a las 14:23, Michael Bladowski (< notifications@github.com>) escribió:
@price2b https://github.com/price2b in case you need prof help, feel free to contact me anytime 😏
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/michabbb/ebay-oauth-playground/issues/1?email_source=notifications&email_token=AADA26W4WXYGRN3ZBGTCZTDP6NZZXA5CNFSM4H6WREL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZNY7WI#issuecomment-509317081, or mute the thread https://github.com/notifications/unsubscribe-auth/AADA26V33PUDHYP27P6ZMC3P6NZZXANCNFSM4H6WRELQ .
Hi Micha, testing the code (thanks for sharing) i found that error appeared when redirect to application. the information displayed on debug:
in vendor/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php
code:
I checked and all dependencies are installed.. thanks in advance