question

newuser-a0ba744a-529b-4ad0-8d25-f37c0d8ecb2f avatar image

Login with Amazon Web: the amazon.Login.setClientId call exposes my Client ID how can I prevent this?

I want to add a Login with Amazon button on my website to facilitate the linking of a device to a user's Amazon account in order that the device can be controlled by Alexa.

This is a code snippet from step 3 in the Amazon documentation found here:

https://developer.amazon.com/docs/login-with-amazon/install-sdk-javascript.html


window.onAmazonLoginReady = function() {

amazon.Login.setClientId('amzn1.application-oa2-xxxxxxxxxxxxx');

};

login with amazon
1 comment
10 |3000 characters needed characters left characters exceeded

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

1 Answer

Anurag avatar image
Anurag answered

This API can be called from the JS code. Client Secret must be kept safe and outside any JS code.

10 |3000 characters needed characters left characters exceeded

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