I was able to successfully use Net :: OpenID :: Consumer, but when I started asking for the user's email address, Google now prompts the user to allow the sharing of their email address. This happens every time, regardless of whether the user checks the Remember This Statement check box. How to get Google to request a user every time?
Our site Registration and login for OpenID login are the same, otherwise we could only request an email address from Google when a user registers.
I will try to publish a sufficiently appropriate code (this application is for dancers).
my $csr = Net::OpenID::Consumer->new( ua => LWP::UserAgent->new(), consumer_secret => $secret, ); my $claimed_identity = $csr->claimed_identity('https://www.google.com/accounts/o8/id'); $claimed_identity->set_extension_args( "http://openid.net/srv/ax/1.0", { 'mode' => 'fetch_request', 'type.email' => 'http://axschema.org/contact/email', 'required' => 'email', }); my $check_url = $claimed_identity->check_url( return_to => 'http://my.site.com/openid_landing', trust_root => 'http://my.site.com', delayed_return => 1, );
Yahoo does not seem to have this problem. I think this may be a problem for Google, but I'm betting on my code.
source share