Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying oauth #1

Closed
jurecotic opened this issue Apr 9, 2015 · 12 comments
Closed

Error when trying oauth #1

jurecotic opened this issue Apr 9, 2015 · 12 comments

Comments

@jurecotic
Copy link

When I try using the acd cli i get asked to go to the url, but when I visit said url I get the following from amazon:

Error Summary
400 Bad Request
The redirect URI you provided has not been whitelisted for your application
Request Details
redirect_uri=http%3A%2F%2Fwww.prostipad.si
client_id=amzn1.application-oa2-client.5499b8c9f5ca4892979b82b3099ecd18
response_type=code
scope=clouddrive%3Aread+clouddrive%3Awrite

Amazon support had said, that I whitelisted the wrong url? Which one should I?

@yadayada
Copy link
Owner

yadayada commented Apr 9, 2015

I'm sorry. The README is incomplete and a tad off.
The security profile needs to include http://localhost as an allowed return URL (in the 'Web Settings' tab of the security profile).

@jurecotic
Copy link
Author

Ok, after doing this, the Oauth login works fine now.

@yadayada
Copy link
Owner

yadayada commented Apr 9, 2015

The README will be changed in the next commit.

@yadayada yadayada closed this as completed Apr 9, 2015
@procmail
Copy link

I'm getting the same error, and in the Security Profile, there is no "Web Settings" tab.

I see the tabs "General, "Android/Kindle Settings" and "iOS Settings" only.

@yadayada
Copy link
Owner

I think the problem is that you didn't create the profile on the 'Login with Amazon' page.
You can select your existing profile there and enable oauth for it. After this, there should be a 'Web Settings' tab.

That's how it looks for me:
screenshot-amazon apps services developer portal - google chrome

@procmail
Copy link

Yes, you're right. I didn't use the "Login with Amazon" link. I just created the security profile normally.

Also, once I did the Web Settings thing, and ./acd_cli sync asked me for the redirect link, initially I pasted the first redirect url. This url is an Amazon page asking me to click OK to authorize the access.
What was needed was for me to click on the OK first in the web browser, after which I was brought to the error page (localhost isn't defined after all). It is this localhost redirect url which had to be pasted.

@yadayada
Copy link
Owner

Yup, it's the localhost URL. The query string is needed for the authentication.

@merclangrat
Copy link

Strange thing.
I'd created security profile as mentioned before, and after starting "acd_cli.py sync" I received

Please visit http://localhost/?error=invalid_scope&error_description=An+unknown+scope+was+requested
Please enter the url you have been redirected to:

Should I make some additional steps?

@yadayada
Copy link
Owner

Maybe your profile wasn't whitelisted correctly. The URL should start with "https://www.amazon.com/ap/signin?".

@merclangrat
Copy link

Thanks a lot! I've sent whitelist request, I haven't read about this, sorry :)

@yadayada
Copy link
Owner

It is no longer necessary for every user to register a security profile. I had begun to change the oauth procedure, but you were faster, apparently.

@merclangrat
Copy link

it's interesting! I'll download, of course, new version, try it and watch a diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants