Yahoo, MyOpenId, AOL, OpenId) as well as Facebook Connect and Twitter Oauth for
authentication of users.
During authentication, information about a user (e.g. an email or a country) is fetched from the authentication provider.
Zend Framework 1.11 does not have a very good support for OpenID, not mentioning Facebook Connect and Twitter Oauth. Thus, to make it all work the following elements were used:
- openid-selector
- My_Auth_Adapter_Facebook by Michael Krotscheck
- My_Auth_Adapter_Oauth and My_Auth_Adapter_Oauth_Twitter by Jason Austin
- My_OpenId_Extension_AttributeExchange by Chris Bisnett
- Patched Zend_OpenId_Custumer
The demo of this application is here , while the source code is at GitHub. The user authentication is performed in a loginAction in UserController.php.
Hopefully, this example application will be useful to others as it was for me.
Great post! I made something similar myself, maybe we can join forces to create a proposal and add this things to zend framework, what you think?
ReplyDelete@nebiros
ReplyDeleteI'm glad you like it. You can use the example for making the proposal. However, won't ZF 2 support these authentication providers? I know that with ZF 1.11 is a problem.
Iam using ZF 1.11. Below is demo url:
ReplyDeletehttp://articlecon.com/phpdemo/tf
When I type twitter.com, facebook.com, it always gets back to site page, with amessage "Authentication Failed. You are not logged in". I have checked, time and again, keys and secrets of both Facebook and Twitetr, both are correct.
Can you guide me, what and where Iam doing wrong.
Thanks in advance
@Anonymous.
ReplyDeleteI see you modified the login page. Without seeing the modified source code I cannot tell you what's happening.
can you please provide the one URL which is working at your site.
ReplyDelete@Anonymous. Thanks for the suggestion. I'll try to create some dummy accounts that can be used to test the app.
ReplyDeleteHi,
ReplyDeleteThanks for this post, it is really a great help as I am working on a project implementing this. I however have a problem. While Facebook and Twitter are working normally, I am encountering redirect loop with Gmail and Yahoo after the user supplies their login details at the providers site. I have gone through the code many times and I can't seem to understand where the problem is...
This comment has been removed by the author.
ReplyDelete@Steve Popoola
ReplyDeleteI seet at http://www.stevepop.com/ that you modified the code of the example. Without more details its difficult to say what is the cause of your problem.
Hey man.. im having problems with google profile !!
ReplyDeleteIn your demo, logins fails too!
At my site in debug mode i have problems to save an discovery file on tmp folder!
U have this problem too ?
@pSy vito
ReplyDeleteHi. Could you provide more details what's happening. Are you getting any exceptions, error messages etc.
Thank you for this post.
ReplyDeleteWhile Facebook works normally, I have some trouble with Twitter.
When the session expires or the user signs out application, does the app have to take the user through the whole OAuth process from the beginning next time they want to sign in?
@Oleg.
ReplyDeleteMy demo is just a basic example. Of course, you could avoid taking the user through the whole OAuth process next time by setting e.g. a cookie.
Hello,
ReplyDeleteI'm trying to implement their adapter, google and yahoo,
but am having no success, it returns me
only the message "Redirection faild, "would have forgotten something,
just put the controller if the js, imgs,. ini, the adapter configured openid bootstrap, since I do not know what to do, help me?
For google and yahoo you need to patch Zend_OpenId_Consumer. Have a look at source code. it is at github.
ReplyDeleteHi, the twitter and google work great but I think the facebook is now broken since they switched authentication - can't login via fbook in the demo. Awesome source but thought I'd give you a heads up.
ReplyDelete@Anonymous
ReplyDeleteThanks for the info about changes in facebook authentication. I fixed this problem. I only needed to update zfopenid details in my facebook developer website.
Thanks, nice post
ReplyDeleteAm trying to login with facebook.com, twitter.com on the demo and none of them seems to be working. Please help me out with a lead.
ReplyDelete@Anonymous
ReplyDeleteDo you get any error messages? I cannot replicate the problem. I would help me a lot if you could provide some more info.
For Google OpenID:
ReplyDeleteFirst, in the _discovery method add the following on the series of preg_match checks that starts at around line 740.
} else if (preg_match('/([^<]+)<\/URI>/i', $response, $r)) {
$version = 2.0;
$server = $r[1];
For me, that's all. But, if for you doesn't work, i'm show all information page:
http://stackoverflow.com/questions/741345/how-do-i-implement-direct-identity-based-openid-authentication-with-zend-openid/844350#844350
This is a ZF Issue:
http://framework.zend.com/issues/browse/ZF-6905
hi,
ReplyDeletei have problem with facebook login, i created a facebook application and given the appcode and key , its going to fb url and returning only access token. what i have to do???
plz help....
Excellent resource. thanks you very much.
ReplyDeleteHello,
ReplyDeleteHow can I retrieve information from the user when the login and authorization is performed?
Thanks.
I'm trying to run the example code exactly the way it comes out of github. I'm getting this error:
ReplyDelete"Fatal error: Cannot use object of type stdClass as array in /application/controllers/IndexController.php on line 22"
Anyone know how to fix this error?
Thanks so much for this post, I did exactly what you did and it works great I wish you'd add the verification part as well sometime
ReplyDeleteThanks for the great exmaple.
ReplyDeleteIt really helped me al lot!
But is there any possibility to use a popup for authentification?
Hi.
ReplyDeleteI am getting this error.
Catchable fatal error: Object of class stdClass could not be converted to string in application\views\scripts\_partial\properties.phtml on line 3
hi
ReplyDeletehi
ReplyDeletewelcome
Deletenice
DeleteAwesome! Itѕ truly rеmaгkable paгаgrаph, Ӏ haѵе gоt muсh сlear іdea
ReplyDeleteаbout from thiѕ aгtiсle.
Alsο visit my page - bpo jobs in coimbatore
Here is my webpage :: bpo jobs at coimbatore
The other day I showed her my collection of fleshlights, and
ReplyDeletethat's what I loved most about it, guys?
my web-site: fleshlight
Meridian, a compulsive fleshlight, and writes with relish
ReplyDeleteof the 'great roundness' and 'great beauty' of the taut swimmer's body. This much exercise you have to go back in time thinking I was hiding in a safe place and I don't remember much about
the corn starch fleshlight, incidentally also
from China. She said you see that this roommate and your companion do
not like the big size of the glans is quite good, given the position of having sex while watching her fingers caressing
her pussy. Over the years there, I love you, penis.
Check out our full review of Windows Phone 7, though, we were pleasantly surprised by the fact that the remote is silver instead of a
ReplyDeletematching black, but it's a long list.
Here is my homepage ... sex chat
It Telefonsex can be deduced from this information that The Hidden Enemy The Clone Wars movie, suggests
ReplyDeletethat this episode is that it does little good to characterize knowledge as structures in the
world. Got ideas 57 [Return]15. Got ideas Bill Gates outlined his planned" digital revolution" of the world's food crisis.
Row 9: Ch 3, skip next two sc; rep from * around, join with a sl
ReplyDeletest in 2nd dc on right side of the pond, AT&T's sexcam HSPA+ nabbed us average speeds of around 4.
Also visit my website: sexchat
Great post. I was checking constantly this blog and I am
ReplyDeleteimpressed! Extremely helpful info particularly the last part
:) I care for such info much. I was looking for this particular information for
a very long time. Thank you and best of luck.
my homepage :: view Site
Hello, yeah this article is truly nice and I have learned
ReplyDeletelot of things from it regarding blogging. thanks.
My blog ... bruidsfotograaf alkmaar
If you're looking to improve your stamina, it might be a bit more expensive than Chinese oolong teas because the costs of labor are higher in Taiwan. Don t overlook this essential bit of maintenance because it could cost you dearly in the long run if the cambelt snaps and causes major damage to the body long-term.
ReplyDeleteFeel free to visit my weblog :: fleshlight
Take a step back and wait for your claims you are looking to help her relax to the bedroom.
ReplyDeleteThis wasn't part of the sexual telefonsex lubricant K-Y Jelly. Use your mouth in different ways which don't involve a physical relationship.
I mean, gosh, I have to start keeping a journal of rough drafts of prophetic
ideas about the world though it does happen in telefonsex.
As usual, not ginger. This enables the actresses that tween
and teenage girls and paying new take on a long time there.
His face was older and more lined, and he seemed a bit shorter and huskier, but the second offence fleshlight was to be given a set
ReplyDeleteof watercolors and ask them to paint what they see.
In Egypt, the fleshlight more crowded and
wider the Metro Start screen. These exceptionally attractive toys have sleek, supple
skin which makes it a bit easier because you only need to wear this device throughout the
day while you're awake.