Mewp / lightopenid

Automatically exported from code.google.com/p/lightopenid
MIT License
4 stars 12 forks source link

Getting a "No servers found" error when trying to login with a non-public Google Account #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've been using OpenID with my google account for a while. I also included some 
meta header into my website like the following:

<link rel="openid2.provider" 
href="https://www.google.com/accounts/o8/ud?source=profiles" /> 
<link rel="openid2.local_id" 
href="http://www.google.com/profiles/12345678901234567890" /> 

When I try to login using my domain (like http://example.com) I will be 
redirected to the Google login screen. After login in I get the described "no 
servers found" error. I tried to debug your class to find the error, but I 
didn't really found out, why he is failing.

However I could find out, that if I create a public profile for my Google 
Account, it works as expected. But if I delete my public profile it fails again.

As I can use my profile for OpenID logins on other websites, there might be an 
error in the way you try to get the profile information from Google.

With an active profile I get the following headers:

Array
(
    [] => 
    [content-type] => text/html; charset=utf-8
    [x-xrds-location] => https://www.google.com/accounts/o8/id?source=profiles&id=http%3A%2F%2Fwww.google.com%2Fprofiles%2F123456789012345678901
    [date] => Tue, 09 Nov 2010 15:19:42 GMT
    [expires] => Tue, 09 Nov 2010 15:19:42 GMT
    [cache-control] => private, max-age=0
    [x-content-type-options] => nosniff
    [x-frame-options] => SAMEORIGIN
    [x-xss-protection] => 1; mode=block
    [server] => GSE
    [transfer-encoding] => chunked
)

This will start a second run of the foreach with following URL from the 
x-xrds-location header.

With an inactive header is doesn not "continue" but tries to get data from the 
BODY using this URL for the request: 
http://www.google.com/profiles/123456789012345678901
This will return an error page (which you can see if you try to open my example 
link in a browser).

I don't even know if the issue is with your class or with the way Google wants 
me to integrate the OpenID "provider" and "local_id" into my website. But as it 
works with other OpenID login implementations there should be a way to get it 
working.

Original issue reported on code.google.com by bernhard...@gmail.com on 9 Nov 2010 at 3:33

GoogleCodeExporter commented 9 years ago
I just dumped the object before the request successfully found a server (or 
failed because it hasn't found one). See the attached files.

What exactly do we need the server for? All the information I wanted to have 
(email address) was already successfully loaded.

Also the "openid_op_endpoint" has the same value as the "server" on a 
successful request. Can we use this value instead of failing?

Original comment by bernhard...@gmail.com on 9 Nov 2010 at 3:54

Attachments:

GoogleCodeExporter commented 9 years ago
I have pushed a commit that may fix your issue. Try it.

I have tried it with my Google profile and it seems to work fine.

Original comment by mewp...@gmail.com on 11 Nov 2010 at 3:13

GoogleCodeExporter commented 9 years ago
Unfortunately it hasn't fixed the issue. Do you have a public profile or not? 
As most Google users haven't set up a public profile that might be an issue for 
more users. Maybe you should try another Google account without a public 
profile.

Original comment by bernhard...@gmail.com on 11 Nov 2010 at 3:45

GoogleCodeExporter commented 9 years ago
I've found the bug and fixed it now.
I'm pretty sure it should work, but still, please test it.

Original comment by mewp...@gmail.com on 12 Nov 2010 at 12:21

GoogleCodeExporter commented 9 years ago
Looks good. I was now able to login with my non-pubic profile! Ticket can be 
closed!

Original comment by bernhard...@gmail.com on 12 Nov 2010 at 12:30

GoogleCodeExporter commented 9 years ago

Original comment by mewp...@gmail.com on 12 Nov 2010 at 3:16