[英]Auto Login to User from Site to Disqus
I added the Disqus to my website and making use of the script 我将Disqus添加到我的网站并使用了脚本
SSO configuration is like this: SSO配置是这样的:
Name: example Slug: example 名称:example子弹:example
no call back url is set at my end. 我没有设置回叫网址。
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'myexample';
var disqus_identifier = 'http://www.example.com/Welcome...
var disqus_title = 'My Example';
var disqus_url = 'http://www.example.com/Welcome...
var remote_auth_s3 = "<%=Payload%>";//Its generate by server side code
var api_key = "Public Api Key Is here";
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
I am just using the above script and passing the values. 我只是使用上面的脚本并传递值。 Will this script auto login my website users to Disqus or I have to do other extra efforts.
该脚本会自动将我的网站用户登录到Disqus还是我必须做其他额外的工作。
Thanks Dalvir 谢谢达维尔
My issue fixed after making use of variable like this 使用这样的变量后,我的问题已解决
var disqus_config = function () {
// The generated payload which authenticates users with Disqus
this.page.remote_auth_s3 = "<%=Payload%>";
this.page.api_key = "<%=Key%>";
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.