Launching IDP pop window instead account chooser

54 views
Skip to first unread message

Nahuel Bulian

unread,
Oct 25, 2012, 10:14:59 AM10/25/12
to google-iden...@googlegroups.com
Hi there!
First of all, thanks in advance!

I'm working in a project how have this popup windows for the login:
Imágenes integradas 1

And We want to trigger the IDP windows directly avoiding the native "Account Chooser":
Imágenes integradas 2

My best approximation was launch the Account Chooser using this: jQuery('#navbar').accountChooser('showAccountChooser');

Can anybody tell me if it possible? and what should I do?

Best regards!
 NB.

 Antes de imprimir, pensá en el medio ambiente.
 Before printing, think about the environment.
 Avant d'imprimer, pensez à l'environnement.

1.png
2.png

Adam Dawes

unread,
Oct 25, 2012, 3:01:43 PM10/25/12
to google-iden...@googlegroups.com
Hi,

We'll soon be updating the ID Toolkit to include accountchooser.com instead of the native Account Chooser. This will have some nice advantages in that as other sites integrate with Account Chooser, your users may not need to enter their email address and will be able to simply click on the identity that is already there.

thanks,
AD
2.png
1.png

NonoX

unread,
Oct 25, 2012, 3:30:22 PM10/25/12
to google-iden...@googlegroups.com
Well, I solved this getting the authorized url using this function (php):

public function get_idp_url($identifier=NULL) 
{
$postData = array();
$postData['identifier'] = $identifier; //gmail.com, yahoo.com, hotmail.com or aol.com
$postData['continueUrl'] = "http://yoursite.com/callback/";
$postData['uiMode'] = "popup";

$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
CURLOPT_POSTFIELDS => json_encode($postData),
CURLOPT_SSL_VERIFYPEER => FALSE,
CURLOPT_SSL_VERIFYHOST => FALSE));

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($http_code == '200' && !empty($response)) {
$res =  json_decode($response, true); 
redirect( $res['authUri'] );
} else {
echo "app_error_call_federation";
return;
}
}

Therefore, the steps are:

1) Open a new blank window.
2) Run the function to get the authorized url.
3) Redirect the window with the authorized url.
4) If you are on the IPD main page to login is that everything went well.

I hope that cleared.

NB

Nahuel Bulian

unread,
Oct 25, 2012, 3:34:23 PM10/25/12
to google-iden...@googlegroups.com
Hi Adam!
Thanks for your quick response, what you said sounds great. By the moment I solved my needs using a php function, I've posted it in my previous message.

Saludos

 NB.

 Antes de imprimir, pensá en el medio ambiente.
 Before printing, think about the environment.
 Avant d'imprimer, pensez à l'environnement.



2012/10/25 Adam Dawes <ada...@google.com>
2.png
1.png

Shmuel Krakower

unread,
Nov 1, 2012, 12:35:51 PM11/1/12
to google-iden...@googlegroups.com
Hi,
Sounds cool. Any release date for this?

Adam Dawes

unread,
Nov 1, 2012, 12:44:36 PM11/1/12
to google-iden...@googlegroups.com
In the next week or two. We'll make an announcement once everything is available.

thanks,
AD
Reply all
Reply to author
Forward
0 new messages