amazon-root element to be present in the page. The
amazon-root element must not be hidden using
display: none or
visibility: hidden, or some parts of the SDK will not work properly in Internet Explorer.
The SDK inserts elements into
amazon-root that expect to be positioned relative to the body or relative to an element close to the top of the page. It is best if the
amazon-root element is not inside an element with
position: absolute or
position: relative settings. If you must place the
amazon-root element inside of a positioned element, you should give it a position close to the top of the body or some parts of the SDK may not work properly.
Add the following code after the opening
amazon-roottag, into your page:
After the SDK has loaded, it will call
window.onAmazonLoginReadyfor initialization. Before using the SDK, you must call
amazon.Login.setClientId, passing your client identifier.
YOUR-CLIENT-IDwith the Client ID generated when you Registered Your Application.
AuthorizeRequestobject. After the request is complete, the object will contain properties detailing the response (such as an access token or authorization code, which you can use to obtain customer profile information):
www.example.comwith the domain of your website.Tip: By default, the SDK will display the login screen in a popup window. You can set the
popupproperty of the
After the user has logged in and consented to share the specified data, the current window will be redirected to the given URI and the authorization response will be added to the query string. The URI must use the HTTPS protocol and be on the same domain as the current window.