willblaschko / AlexaAndroid

A library and sample app to abstract access to the Amazon Alexa service for Android applications.
GNU General Public License v2.0
280 stars 133 forks source link

Logout from Amazon issue #127

Open Bharath-Ponamgi opened 6 years ago

Bharath-Ponamgi commented 6 years ago

Hi, Problem with Login with Amazon and Logout From Amazon While trying to logout from the Amazon Alexa account its getting into the onSuccess callback method but after that when I tried to login using alexaManager.logIn(authorizationCallback); its calling onSuccess callback method without redirecting to Login page to enter credentials.

Below is the code that I'm trying for Logout. AuthorizationManager.signOut(getApplicationContext(), new Listener<Void, AuthError>() { @Override public void onSuccess(Void response) {

                }
                @Override
                public void onError(AuthError authError) {
                    Log.e(TAG, "Error clearing authorization state.", authError);
                }
            });

Note: In some phones when trying to login its redirecting to other browser apps like chrome and in some phones it is redirecting to webview in the same app. If its in same app's webview it is taking to Login Screen of Amazon and if its from Browser apps then its taking to Signin Screen of Amazon. These two screens are completely different, which one is correct? I'm mainly using this for Alexa I'm facing the issues in this as well. So if I logged out from amazon account successfully then will Alexa's auth manager will go to logout state or not?

renu-parameswaran commented 6 years ago

Hi, I have been facing the same issue but i have a problem with authorization- that it shows "We're sorry! An error occurred when we tried to process your request. Rest assured, we're already working on the problem and expect to resolve it shortly." Do you know to resolve this?

Bharath-Ponamgi commented 6 years ago

Hi Renu, to solve the authorization problem you are facing, make sure of the Product Id & Product DSN that you have integrated in the project and in the Amazon console are same. Basically the issue "We're sorry! An error occurred when we tried to process your request. Rest assured, we're already working on the problem and expect to resolve it shortly." will come only when the credentials that we pass are wrong.

renu-parameswaran commented 6 years ago

Hi, Thanks for replying, but we are only required to put product id in project right? Where do we get Product DSN from?

Bharath-Ponamgi commented 6 years ago

Yes, I think Product DSN is not required for now as the library inbuilt having it. Check the product Id is correct or not.

Bharath-Ponamgi commented 6 years ago

By the way the Product DSN is the Amazon ID that will be in Amazon Developers Console -> Alexa -> My Products section

renu-parameswaran commented 6 years ago

okay, where am i supposed to include product DSN in the project, I'm still facing the same issue. I rechecked my product id, it seems to be correct.

ghost commented 6 years ago

@Bharath-Ponamgi Thank you. It was about product ID. I resolved it.