I'm trying to create a low friction sign in implementation for my users using lightopenid and I've run into a use case that's causing problems.
The challenge happens because of the following code I use to authenticate the user but in the case where the user is not logged in the whole google challenge flow is activated
$openid->identity = 'https://www.google.com/accounts/o8/id';
header('Location: ' . $openid->authUrl());
In summary if the user is already signed in everything works smoothly. I'd like to be able to test if the user is signed in without an authentication challenge which is a pretty bad experience for a first time user. I can then implement a button allowing the user to sign in but still allow them to view the majority of the content on the website.
You can use
$openid->authUrl(true)
to authenticate without going through the sign in process