Start a new topic

Facebook reauthorization problem | Android

Facebook reauthorization problem.

Dear Kinvey team. Could you please help us with this issue.


Issue comments:

- Android v3 Beta-02 SDK ( Jan 27, 2017)


Case check User email existance returns InsufficientCredentials exception

http://devcenter.kinvey.com/android-v3.0/guides/users#userexists


Pre-conditions use your email also as username

Steps to reproduce

1) Register new user using http://devcenter.kinvey.com/android-v3.0/guides/users#signup

2) After successful registration make call http://devcenter.kinvey.com/android-v3.0/guides/users#userexists with the same email, that you registered


Actual results getting InsufficientCredentials exception (see stacktrace below)

P.S. Error still occurs even when call method UserStore.exists() with username/email, that doen't exists in Users database.

 

com.kinvey.java.core.KinveyJsonResponseException: InsufficientCredentials

                                                     The credentials used to authenticate this request are not authorized to run this operation. Please retry your request with appropriate credentials

                                                         at com.kinvey.java.core.AbstractKinveyJsonClientRequest.newExceptionOnError(AbstractKinveyJsonClientRequest.java:77)

                                                         at com.kinvey.java.core.AbstractKinveyJsonClientRequest.newExceptionOnError(AbstractKinveyJsonClientRequest.java:32)

                                                         at com.kinvey.java.core.AbstractKinveyClientRequest.executeUnparsed(AbstractKinveyClientRequest.java:385)

                                                         at com.kinvey.java.core.AbstractKinveyClientRequest.executeUnparsed(AbstractKinveyClientRequest.java:291)

                                                         at com.kinvey.java.core.AbstractKinveyClientRequest.execute(AbstractKinveyClientRequest.java:407)

                                                         at com.kinvey.java.store.BaseUserStore.exists(BaseUserStore.java:124)

                                                         at com.kinvey.android.store.UserStore$ExistsUser.executeAsync(UserStore.java:1106)

                                                         at com.kinvey.android.store.UserStore$ExistsUser.executeAsync(UserStore.java:1091)

                                                         at com.kinvey.android.AsyncClientRequest.run(AsyncClientRequest.java:69)

                                                         at android.os.Handler.handleCallback(Handler.java:739)

                                                         at android.os.Handler.dispatchMessage(Handler.java:95)

                                                         at android.os.Looper.loop(Looper.java:148)

                                                         at android.os.HandlerThread.run(HandlerThread.java:61)


Hello Michael,


You are using a very old version of Android SDK. There have been a significant number of fixes and enhancements to the Android SDK since Android v3 Beta-02 SDK ( Jan 27, 2017) was released. We strongly recommend that you upgrade to the latest version of the Android SDK v3.0.3. It can be found at the following URL.


https://devcenter.kinvey.com/android/downloads


You will note that in the Android 3.0.0 Beta-05 release there was a fix made to correct a problem with checking that a username exists.


Please let us know once you have completed the upgrade.


Regards,


Billy Gee

Hi Billy,


Sorry, typos. We are using Android 3.0.1 SDK, but experiencing the same issue.

Michael,

Can you please upgrade to the latest Android SDK v3.0.3? This might not fix the issue but we strongly recommend customers to use the latest version of the SDK.

Thanks,
Pranav

 

Hi Michael,

I can confirm that you should be able to check the username exists with following code. I have tested it with the latest Kinvey sdk (v3.0.3) and it is working for me:

                         UserStore.exists("Username", MyKinveyClient, new KinveyClientCallback<Boolean>() {

                             @Override

                             public void onSuccess(Boolean aBoolean) {

                                 System.out.println(" If Username already Exist :"+aBoolean);

                             }

                             @Override

                             public void onFailure(Throwable throwable) {

                                 System.out.println(" something went wrong: "+throwable);

                             }

                         });


Please try this code and make sure you are using correct credentials for initialising your KinveyClient. The exception you are getting usually occurs because of the incorrect credentials. Please get back to us if the problem persists.

Regards,
Abhijeet

I'm developing a facebook application and everything is going fine with log in and comments etc. I came across the issue of 'reauthorizing' users. One of my users 'accidentally' pressed 'don't allow' when it asked them for access to their information and now they cannot sign in. Does anyone know how I can reauthorize them krogerfeedback?

Login or Signup to post a comment