question

shaqspeare avatar image
shaqspeare asked

JavaScript SDK has not been whitelisted for your application. TAKE2

[On behalf of: One's Own Chef] I have an issue with this being allowed on localhost. I am trying to use amazon sandbox to test a 'Pay with Amazon' button, using a file at localhost:8888. However I receive the 'JavaScript SDK has not been whitelisted for your application' 400 error when the amazon window pop-up appears. Please can you tell me how i can test your system without needing to have SSL certificates in place. Many thanks QUOTE 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. Hide Details Error Summary 400 Bad Request The domain on which you are using the JavaScript SDK has not been whitelisted for your application. UNQUOTE Also doesn't work using localhost through port 80.
login with amazon
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shaqspeare avatar image
shaqspeare answered
In order to use Login With Amazon or Pay With Amazon on your site, you must whitelist the allowed origins you intend to use. This is a security measure that prevents malicious parties from claiming to be your site. Please visit the Login With Amazon App Console and follow the instructions under the "Add a Website to your Application" section under step 1, "Register Your Application", of the Getting Started Guide for Web to register your desired origins for your site. Please note, however, that there is a limitation in the Javascript SDK that prevents using Pay With Amazon on insecure sites. As a result, you will need to enable SSL in order to test Pay With Amazon. We are investigating this issue and will update this forum post as soon as we have more information.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shaqspeare avatar image
shaqspeare answered
[On behalf of: One's Own Chef] Thanks, but I don't want to use Login with Amazon on an insecure site. I'm aware that once my site goes live, it needs to sit on a secured server with SSL or equivalent. In development, I want to TEST login with amazon sandbox on localhost- pretty reasonable I think. Please let me know if there is any way to test your system as a developer, or whether it's better to look elsewhere. Many thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shaqspeare avatar image
shaqspeare answered
At this time, Pay With Amazon does not support testing on an insecure localhost site. We are actively investigating this issue. In the meantime, you could generate a self-signed certificate to use during local testing. Your browser will issue certificate warnings, but Login With Amazon and Pay With Amazon will still work. In case you decide to use a self-signed certificate, here are some instructions for generating one: - OpenSSL - http://stackoverflow.com/questions/10175812/how-to-build-a-self-signed-certificate-with-openssl - Windows / IIS - http://www.howtogeek.com/107415/it-how-to-create-a-self-signed-security-ssl-certificate-and-deploy-it-to-client-machines/
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shaqspeare avatar image
shaqspeare answered
[On behalf of: MDEO] This is really bad. What a productivity drain to have to setup SSL in a local test environment just for testing.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shaqspeare avatar image
shaqspeare answered
Hi MDEO, We apologize for the inconvenience this has caused you, and understand that using SSL in a test environment takes some effort. However, we strive to ensure that our customers' data is kept as secure as possible, which is why we require SSL. As Annabelle mentioned above, there are ways to generate a self-signed certificate without having to register with a Certificate Authority.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.