Lightopenid, Gmail Auth, show popup instead of fullpage form

654 views Asked by At

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

&ltmpl=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

1

There are 1 answers

5
Mewp On BEST ANSWER

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:

$ui = "&openid.ns.ui=" . urlencode('http://specs.openid.net/extensions/ui/1.0') . "&openid.ui.mode=popup"
header('Location: ' . $openid->authUrl() . $ui);