php - How to ask LightOpenId to get the users email in checkid_immediate mode? -



php - How to ask LightOpenId to get the users email in checkid_immediate mode? -

premises: i using php lightopenid authenticate users through google account. i using standard sample provided (example.php) website. nil fancy. adding 1 line or 2 alter behavior. all clients googlers. requirement1

i not want client log twice (sso behavior), add together $openid->mode=checkid_immediate before calling header...$openid->authurl().

i experience 2 problems:

i cannot email, lang ... attributes.

in fact, using checkid_immediate mode , next authurl() user connected correctly expected.

but modifying code , adding $openid->required gather attributes prior authurl() request forces phone call converted checkid_setup mode call.

how can i, in 1 call, maintain checkid_immediate mode , attributes ?

subdomain.mydomain2.com code not behave www.mydomain1.com www.mydomain1.com works fine checkid_immediate. subdomain.mydomain2.com same code converted checkid_setup call.

how can maintain checkid_immediate mode subdomain different www ?

problem #2 solved itself!!! after clearing cache , restarting google chrome

thanks in advance.

as of 0.5 authurl method has optional bool parameter check immediately. try:

if (!$openid->mode && !empty($storedidentity)) { $openid->identity = $storedidentity; $openid->required = array('contact/email', 'pref/language'); header('location: ' . $openid->authurl(true)); }

*edited code illustration include question's requested attributes. presumes $storedidentity identity url returned checkid_setup previously.

php openid lightopenid

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -