ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
<div id="page_md_content" class="page_content_main" style="width:95%;"><div id="editor-md" class="main-editor markdown-body editormd-html-preview"><div class="markdown-toc editormd-markdown-toc open-list"><ul class="markdown-toc-list"></ul></div><p>意梵聚合登录,就是利用用户在第三方平台上已有的账号来快速完成自己应用的登录流程。简化用户注册登录过程、改善用户浏览站点的体验、迅速提高网站注册量和用户数据量。有完善的开发文档与SDK,方便开发者快速接入。</p><br><p>这里的第三方平台,是指QQ、微信、微博、百度等平台。通过本站的聚合登录接口,你的网站可以登录获取相应的用户信息和授权信息,例如uid、token、用户昵称、头像等。本站的聚合登录完全符合OAuth2.0身份鉴权机制。</p><br><ul><br><li><strong>目前支持接口</strong></li></ul><br><p>QQ、微信、微博、支付宝、百度、华为、小米、钉钉、Gitee、Github、微软、Google、Facebook</p><br><ul><br><li><strong>目前插件安装支持网站类型</strong></li></ul><br><p>魔方财务系统、Discuz!X论坛、SWAPIDC、WHMCS、WordPress、Z-Blog、Emlog、Typecho、苹果CMSV10、HYBBS、XiunoBBS、Eyoucms、FastAdmin、Flarum</p><br><center><a href="https://www.ss349.cn" title="官网主页">返回官网</a> · <a href="https://www.ss349.cn/user/" title="免费申请接入">申请接入</a></center><br><br><hr><br><h1 id="h1-u540Eu53F0u7BA1u7406u529Fu80FDu4ECBu7ECD"><a name="后台管理功能介绍" class="reference-link"></a><span class="header-link octicon octicon-link"></span>后台管理功能介绍</h1><p>全新用户中心界面,可查看总体统计与公告<br><img src="https://blog.cccyun.cn/content/uploadfile/202108/QQ%E6%88%AA%E5%9B%BE20210831143303.png" alt=""></p><br><p>更方便查看应用统计,包括不同登录方式占比、新账号数量、请求次数等统计信息<br><img src="https://blog.cccyun.cn/content/uploadfile/202108/QQ%E6%88%AA%E5%9B%BE20210831143348.png" alt=""></p><br><p>所有登录账号一目了然,站长管理更便捷<br><img src="https://blog.cccyun.cn/content/uploadfile/202108/QQ%E6%88%AA%E5%9B%BE20210831143359.png" alt=""></p><br><h1 id="h1--"><a name="如何使用聚合登录?" class="reference-link"></a><span class="header-link octicon octicon-link"></span>如何使用聚合登录?</h1><p>站长通过查看以下操作步骤即可轻松玩转我们的聚合登录,所有网站类型原理相同,四步即可自己搞定对接。<br><strong><em>举例:wordpress主题(Ripro-v2日主题)</em></strong></p><br><h3 id="h3--"><a name="第一步:登录注册账户" class="reference-link"></a><span class="header-link octicon octicon-link"></span>第一步:登录注册账户</h3><p>进入官网(uniqueker.top)在线注册登录账户<br><img src="https://uniqueker.top/s/doc/Public/Uploads/2022-08-19/62ff1ae43edaf.png" alt=""></p><br><h3 id="h3--"><a name="第二步:应用列表创建应用" class="reference-link"></a><span class="header-link octicon octicon-link"></span>第二步:应用列表创建应用</h3><p>进入后台管理中心在应用列表创建应用</p><br><p><img src="https://uniqueker.top/s/doc/Public/Uploads/2022-08-19/62ff143ebd02c.png" alt=""></p><br><p>应用名称:填写自己网站名称。如:聚合登录<br>应用首页网址:填写自己网站首页地址。如:<a href="https://www.ss349.cn">https://www.ss349.cn/</a><br>回调域名白名单:填写自己域名。如:www.ss349.cn</p><br><h3 id="h3--"><a name="第三步:下载安装插件" class="reference-link"></a><span class="header-link octicon octicon-link"></span>第三步:下载安装插件</h3><p><a href="https://www.kancloud.cn/book/qq1781892238/yf10082/652489c7657ab00ecd526cad9e937f9bda05fef6/preview/%E5%AF%B9%E6%8E%A5%E6%8F%92%E4%BB%B6%E4%B8%8B%E8%BD%BD.md">点击前往 </a><br>根据自己网站类型下载所对应插件,我们支持十多种市面主流网站类型,<br>下载安装启用插件即可,插件均有安装说明注释,站长可轻松搞定。</p><br><p></p><center>/ 自己网站插件安装后,填写已创建的应用信息 /</center><br><img src="https://uniqueker.top/s/doc/Public/Uploads/2022-08-19/62ff149e7a3a5.png" alt=""><p></p><br><h3 id="h3--"><a name="第四步:网站添加登录按钮" class="reference-link"></a><span class="header-link octicon octicon-link"></span>第四步:网站添加登录按钮</h3><p>网站后台插件添加完毕后可看见,插件面板有如下代码:<br>我们将所对应代码添加到login登录界面和用户绑定按钮界面即可。(哪里需要登录按钮,你就把代码复制粘贴到对应位置即可。)</p><br><p><img src="https://uniqueker.top/s/doc/Public/Uploads/2022-08-19/62ff170a7685e.png" alt=""></p><br><p><strong>例子(wordpress Ripro-v2主题)</strong>:/wp-content/themes/ripro-v2/template-parts/global/login-form.php</p><br><p><strong>1、在注册新用户处,添加聚合一键登录按钮代码:</strong></p><br><pre><span class="btn-pre-copy">复制</span><span class="btn-pre-copy">复制</span><code class="lang-php hljs"><span class="hljs-meta"><span class="hljs-meta">&lt;?php</span></span><br>ob<em>start();<br>do<em>action(<span class="hljs-string">‘clogin-passport’</span>);<br><span class="hljs-variable"><span class="hljs-variable">$codes</span></span> = ob_get_contents();<br>ob_end_clean();<br><span class="hljs-meta"><span class="hljs-meta">?&gt;</span></span><br></em></em></code></pre><em><em><br><p><strong>2、如您想去除或修改登录按钮上方文字:</strong></p><br><p>在 /wp-content/plugins/clogin-passport/clogin-passport.php<br>文件删除或修改代码</p><br><pre><span class="btn-pre-copy">复制</span><span class="btn-pre-copy">复制</span><code class="lang-php hljs">&lt;p <span class="hljs-class"><span class="hljs-keyword"><span class="hljs-class"><span class="hljs-keyword">class</span></span></span><span class="hljs-class">=”</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">third</span></span></span><span class="hljs-class">-</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">party</span></span></span><span class="hljs-class">-</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">login</span></span></span><span class="hljs-class">-</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">label</span></span></span><span class="hljs-class">“&gt;&lt;</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">label</span></span></span><span class="hljs-class">&gt;&lt;?</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">php</span></span></span><span class="hljs-class"> </span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">_e</span></span></span><span class="hljs-class">(‘</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">Third</span></span></span><span class="hljs-class">-</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">Party</span></span></span><span class="hljs-class"> </span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">Login</span></span></span><span class="hljs-class">‘, $</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">this</span></span></span><span class="hljs-class">-&gt;</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">text_domain</span></span></span><span class="hljs-class">); ?&gt;&lt;/</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">label</span></span></span><span class="hljs-class">&gt;&lt;/</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">p</span></span></span><span class="hljs-class">&gt;</span><br></span></code></pre><br><p>最终效果可参考 <a href="https://www.jruol.com/">https://www.jruol.com/</a> 和 <a href="https://www.wpsea.cn">https://www.wpsea.cn</a> (这两家是wordpress网站,均使用本站聚合登录。其它网站系统原理均相同)</p><br><p><strong>3、在 “个人中心-账户绑定” 中添加社交绑定按钮:</strong></p><br><p>在 /wp-content/themes/ripro-v2/pages/user/bind.php 文件中找到</p><br></em></em><pre><span class="btn-pre-copy">复制</span><em><em><span class="btn-pre-copy">复制</span><code class="lang-php hljs">&lt;p <span class="hljs-class"><span class="hljs-keyword"><span class="hljs-class"><span class="hljs-keyword">class</span></span></span><span class="hljs-class">=”</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">card</span></span></span><span class="hljs-class">-</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">text</span></span></span><span class="hljs-class">“&gt;&lt;?</span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">php</span></span></span><span class="hljs-class"> </span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">echo</span></span></span><span class="hljs-class"> </span><span class="hljs-title"><span class="hljs-class"><span class="hljs-title">esc_html</span></span></span></span></code></em></em><code class="lang-php hljs">(‘绑定第三方登录您可以快速登录账号’,’<span class="hljs-title">ripro</span>-<span class="hljs-title">v2</span>‘);<span class="hljs-meta">?&gt;</span>&lt;/<span class="hljs-title">p</span>&gt;<br></code></pre><br><p>后面添加</p><br><pre><span class="btn-pre-copy">复制</span><span class="btn-pre-copy">复制</span><code class="lang-php hljs"><span class="hljs-meta"><span class="hljs-meta">&lt;?php</span></span><br><span class="hljs-keyword"><span class="hljs-keyword">if</span></span> (!function_exists(<span class="hljs-string">‘get_user_to_edit’</span>)) <span class="hljs-keyword"><span class="hljs-keyword">include</span></span>(ABSPATH . <span class="hljs-string">‘/wp-admin/includes/user.php’</span>);<br>do_action( <span class="hljs-string">‘binding_social_media_account’</span>, get_user_to_edit(get_current_user_id()) );<br><span class="hljs-meta"><span class="hljs-meta">?&gt;</span></span><br></code></pre><br><p>完成以上步骤,用户即可实现社交账户一键登录注册,用户后台自定义绑定功能。</p><br></div></div>