Premises:
- I am using php LightOpenId to authenticate a users through his google account.
- I am using the standard sample provided (example.php) from the website. Nothing fancy.
- Adding one line or two to change the behavior.
- All my clients are Googlers.
Requirement1
I do not want my client to log twice (SSO behavior), so I add the
$openid->mode=checkid_immediate before calling
header...$openid->authUrl().
I experience 2 problems:
I cannot get the email, lang ... attributes.
In fact, using checkid_immediate mode and following with the
authUrl()I get my user connected correctly as expected.BUT Modifying the code and adding the
$openid->requiredto gather the attributes prior theauthUrl()request forces my call to be converted into acheckid_setupmode call.How can I, in one call, keep the checkid_immediate mode and get my attributes ?
subdomain.mydomain2.comcode do not behave likewww.mydomain1.comThewww.mydomain1.comworks fine with thecheckid_immediate. Thesubdomain.mydomain2.comwith the same code is converted into acheckid_setupcall.How can I keep the
checkid_immediatemode with a subdomain different than www ?Problem #2 solved by itself!!! after clearing cache AND restarting Google Chrome
Thanks in advance.
As of 0.5 the authUrl method has an optional bool parameter to check immediately. Try:
*Edited code example to include question's requested attributes. This presumes $storedIdentity is the identity url returned from checkid_setup previously.