Implement single sign on for AMP
Configure single sign on to log in your users.
Single sign-on (SSO) enables your registered users to participate in members-only conversations without an extra registration. Currently, OpenWeb does not support SSO for AMP pages directly. As an alternative, you can implement a read-only Conversation on your AMP pages and redirect your users to a non-AMP mobile page. On the non-AMP mobile page, your users can sign in and then participate in the Conversation.
Similar to OpenWeb's standard SSO and third-party SSO implementations, your backend user management system must securely inform OpenWeb that a user is actively logged into your site.
Implementation
- Locate the source code of the Conversation iframe in the AMP code provided by your OpenWeb PSMPSM - Partner Success Manager.
In the following simplified example,https://amp.spot.im/production.html?spot_im_highlight_immediate=true&redirect=true&spotId=SPOT_ID&postId=POST_ID
is the Conversation source code.
<amp-iframe
width="375"
height="350"
resizable
sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation"
layout="responsive"
frameborder="0"
src="https://amp.spot.im/production.html?spot_im_highlight_immediate=true&redirect=true&spotId=SPOT_ID&postId=POST_ID"
>
TIP
You can search for postID in the AMP code to locate the Conversation iframe.
- Modify the Conversation source URL:
• Removeredirect=true
.
• Appendinactive=true
.
• Appenddata-post-url='https%3A%2F%2Fwww.ENCODED-ARTICLE-URL.com'
.
IMPORTANT
Using a
data-post-url
with any of the following characteristics may lead your users to a broken or incorrect link after clicking on the Conversation:• Contains unencoded characters in the URL
• Leads to a page that does not have a Conversation on it
<amp-iframe
width="375"
height="815"
resizable
sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation"
layout="responsive"
frameborder="0"
src="https://amp.spot.im/production.html?spot_im_highlight_immediate=true&spotId=SPOT_ID&postId=POST_ID&inactive=true&data-post-url=https%3A%2F%2Fwww.ENCODED-ARTICLE-URL.com"
>
- On your non-AMP page, implement OpenWeb's standard SSO and third-party SSO.
Updated 3 months ago