Lightopenid、Gmail Auth、显示弹出窗口而不是整页表单
我正在使用 lightopenid 进行 gmail 身份验证。
找到此处:
呈现 gmail 登录页面的默认方式是全页版本。但我注意到其他网站显示“弹出版本”,并且 URL 为
<mpl=popup
我查看了代码,但看不到向验证 URL 字符串。
有人设法做到这一点吗?
try
{
$lightopenid = new Lightopenid;
$lightopenid->required = $required_attr;
if(!isset($_GET['openid_mode']))
{
$ui = "&openid.ns.ui=" . urlencode('=http://specs.openid.net/extensions/ui/1.0') . "&openid.ui.mode=popup";
$lightopenid->identity = 'https://www.google.com/accounts/o8/id';
redirect($lightopenid->authUrl() . $ui, 'refresh');
}
谢谢
I'm using lightopenid for authentication to gmail.
Found here:
The default way of presenting the login page for gmail is the full page version. But I have noticed other websites showing a "popup version" and in the URL is
<mpl=popup
I've looked through the code and can't see a way of adding some custom options to the auth URL string.
Has anyone managed to do this?
try
{
$lightopenid = new Lightopenid;
$lightopenid->required = $required_attr;
if(!isset($_GET['openid_mode']))
{
$ui = "&openid.ns.ui=" . urlencode('=http://specs.openid.net/extensions/ui/1.0') . "&openid.ui.mode=popup";
$lightopenid->identity = 'https://www.google.com/accounts/o8/id';
redirect($lightopenid->authUrl() . $ui, 'refresh');
}
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于
$openid->authUrl()
返回一个 url,因此向其添加选项并不难。据我所知,这是正确的方法:
Since
$openid->authUrl()
returns an url, adding an option to it isn't too hard.As far as I know, this is the correct way to do it: