Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenID failure #907

Closed
hanche opened this issue May 25, 2011 · 10 comments
Closed

OpenID failure #907

hanche opened this issue May 25, 2011 · 10 comments
Assignees
Milestone

Comments

@hanche
Copy link

hanche commented May 25, 2011

Note: I have only tried this with an account at myopenid.com. Possibly, it works with other OpenID providers.

The setting is that I already have a password controlled account on the forum, and I wish to associate the account with my OpenID account. So I select OpenID from the login page, give it my OpenID url, get told I already have an account (it's associated with my email address after all), and I get to type my password. The result is a red banner with three messages:

Provider is required.
UniqueID is required.
The connection data has not been verified.

Perhaps needless to say, I am not signed in afterwards.

I get this with a variety of browsers (well, firefox 3.6.17 on linux, firefox 4.0.1 and Safari 5.0.5 on the mac) and both on my own newly setup forum and on vanillaforums.org as well.

@ghost ghost assigned tburry May 25, 2011
@tburry
Copy link
Contributor

tburry commented May 25, 2011

I was looking into this and the problem is buried inside the OS openID library we use. It's going to take a bit of brain power to fix it so I need to push this off until the next release.

@dandv
Copy link
Contributor

dandv commented Jun 28, 2011

I might have a related problem: when I try to login with a LiveJournal openID, I get "Email is required".

@TiGR
Copy link
Contributor

TiGR commented Aug 9, 2011

@tburry, how does it related to lightopenid? As far as I've checked that out the problem occurs since validation is being called twice (which should not happen). So, validation fails and everything else then goes wrong. Gonna dig into it deeper tomorrow.

@x00
Copy link
Contributor

x00 commented Sep 9, 2011

yes that is right becuase it posts back to the same form.

The openid is valid

@x00
Copy link
Contributor

x00 commented Sep 14, 2011

Solved

replace

<?php
....
$OpenID = $this->GetOpenID();
if ($OpenID->validate()) {
     $Attr = $OpenID->getAttributes();
     $Form = $Sender->Form; //new Gdn_Form();
     $ID = $OpenID->identity;
     $Form->SetFormValue('UniqueID', $ID);
     $Form->SetFormValue('Provider', self::$ProviderKey);
     $Form->SetFormValue('ProviderName', 'OpenID');
     $Form->SetFormValue('FullName', GetValue('namePerson/first', $Attr).' '.GetValue('namePerson/last', $Attr));
     $Form->SetFormValue('Email', GetValue('contact/email', $Attr));
     $Sender->SetData('Verified', TRUE);
}  

with

<?php
....
session_start();
if(!isset($_SESSION['OpenID'])){
     $OpenID = $this->GetOpenID();
}else{
     $OpenID = $_SESSION['OpenID'];
}
if(isset($_SESSION['OpenID']) || $OpenID->validate()){
     $Attr = $OpenID->getAttributes();
     $Form = $Sender->Form; //new Gdn_Form();
     $ID = $OpenID->identity;
     $Form->SetFormValue('UniqueID', $ID);
     $Form->SetFormValue('Provider', self::$ProviderKey);
     $Form->SetFormValue('ProviderName', 'OpenID');
     $Form->SetFormValue('FullName', GetValue('namePerson/first', $Attr).' '.GetValue('namePerson/last', $Attr));
     $Form->SetFormValue('Email', GetValue('contact/email', $Attr));
     $Sender->SetData('Verified', TRUE);
     $_SESSION['OpenID']=$OpenID;
}      

@x00
Copy link
Contributor

x00 commented Sep 14, 2011

Note I'm not using Gdn::Session(), perhaps it could be more elegant.

The idea is simple. Once validate, it doesn't not need to go through the same hoops, just carry over.

@linc
Copy link
Contributor

linc commented Sep 17, 2011

Auto-close has failed me. ff6510b

@getliberated-zz
Copy link

I am getting the same problem with my own openID provider. I just downloaded Vanilla, and see that the suggested changes are already present.
Is this problem resolved for the original reporter (@hanche)?

@hanche
Copy link
Author

hanche commented Nov 9, 2011

Sorry, I have been too busy lately, so I can't tell if the problem is resolved for me. Some time in December, I may find the time to do an upgrade and check it out.

@getliberated-zz
Copy link

OK. Thanks.

On Nov 9, 2011, at 5:14 AM, hanche reply@reply.github.com wrote:

Sorry, I have been too busy lately, so I can't tell if the problem is resolved for me. Some time in December, I may find the time to do an upgrade and check it out.


Reply to this email directly or view it on GitHub:
#907 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants