question

shaqspeare avatar image
shaqspeare asked

Button on HTTPS page does not appear to work

[On behalf of: infinityball] I have successfully implemented the Login with Amazon button on my site, but it appears to only work on non-https pages (ie home page), however I attempted to put the button on my sign in page, which uses https, and it does not appear to work. I get the popup with w/ login, login and get the allow/deny credentials screen, press allow then the popup redirects to a white page and nothing happens. You can see an example of this on my dev server at https://dev2.web.mcg.demandware.net/on/demandware.store/Sites-jtv-Site/default/Login-Show Any ideas?
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
[On behalf of: infinityball] I say that but https://dev2.web.mcg.demandware.net/on/demandware.store/Sites-jtv-Site/default/Amazon-Test appears to work just fine and you get logged in and redirected back to the Amazon-Test page, so what's the difference between the code on that page and the code on the Login-Show page?
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: infinityball] Figured it out, the amazon example uses a button tag, which was causing the host page to do a post back when I click the Amazon login button which was breaking something (I suspect the link between the host page and the popup). Replacing the button tag with a div fixed my issue.
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: infinityball] Answered
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
Thanks for bringing this to our attention. We have updated the HTML snippet in the Website Getting Started Guide (PDF) to an image within an anchor so that it can now work in forms. The JavaScript snippet that follows for the onClick event was also updated to take the new HTML snippet into account. The HTML version of the Website Getting Started Guide will be updated shortly. Your solution of changing the button tag to a div will also work.
10 |5000

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