react-native-oauth icon indicating copy to clipboard operation
react-native-oauth copied to clipboard

Access token invalid request verb.

Open Arafath-misree opened this issue 8 years ago • 1 comments

manager.addProvider({ 'name_of_provider': { auth_version: '2.0', authorize_url: 'https://provider.dev/oauth', access_token_url: 'https://provider.dev/oauth/token', callback_url: ({app_name}) => ${app_name}://oauth, } }); from the above configuration my identity server is rejecting the access token request due to invalid request. the identity server expect a 'post' request where a 'get' request is being sent by the react-native oauth library. Is there any way i could change the verb ??

The android moniter log as follow.

07-19 13:54:21.707 13515-13515/com.bluesquirrel D/OAuthManager: Called getAccessToken with code: cecdd60a5d7768b8fcbb09c25bcc872afa8628ce8d06f0a43560a8fe22a5bd98 at http://localhost/IdentityServer?code=cecdd60a5d7768b8fcbb09c25bcc872afa8628ce8d06f0a43560a8fe22a5bd98&scope=api1&state=OAuthManagerProviders728011 07-19 13:54:21.738 13515-13515/com.bluesquirrel W/BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 13515 07-19 13:54:21.738 13515-13515/com.bluesquirrel D/OauthFragment: onPageFinished: http://localhost/IdentityServer?code=cecdd60a5d7768b8fcbb09c25bcc872afa8628ce8d06f0a43560a8fe22a5bd98&scope=api1&state=OAuthManagerProviders728011 07-19 13:54:22.951 13515-13542/com.bluesquirrel E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3 Process: com.bluesquirrel, PID: 13515 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:309) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: com.github.scribejava.core.model.OAuth2AccessTokenErrorResponse: {"error":"invalid_request"} at com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor.generateError(OAuth2AccessTokenJsonExtractor.java:65) at com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor.extract(OAuth2AccessTokenJsonExtractor.java:46) at com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor.extract(OAuth2AccessTokenJsonExtractor.java:16) at com.github.scribejava.core.oauth.OAuth20Service.sendAccessTokenRequestSync(OAuth20Service.java:37) at com.github.scribejava.core.oauth.OAuth20Service.getAccessToken(OAuth20Service.java:56) at io.fullstack.oauth.OAuthManagerFragmentController$Load2AccessTokenTask.doInBackground(OAuthManagerFragmentController.java:364) at io.fullstack.oauth.OAuthManagerFragmentController$Load2AccessTokenTask.doInBackground(OAuthManagerFragmentController.java:348) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)  at java.lang.Thread.run(Thread.java:818)  07-19 13:54:23.065 13515-13515/com.bluesquirrel D/OauthFragment: onPause called 07-19 13:54:23.068 13515-13541/com.bluesquirrel E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaae2e3d0 07-19 13:54:23.344 13515-13541/com.bluesquirrel E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb40d3650 07-19 13:54:23.392 13515-13541/com.bluesquirrel E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb40d3570 07-19 13:54:23.432 13515-13515/com.bluesquirrel W/ScreenOrientationListener: Removing an inexistent observer! 07-19 13:54:25.139 13515-13542/com.bluesquirrel I/Process: Sending signal. PID: 13515 SIG: 9

please be kind enough to help !

Arafath-misree avatar Jul 19 '17 11:07 Arafath-misree

Oh, shit. Try to use access_token_verb

monolithed avatar Jan 30 '18 17:01 monolithed