Creating a login system + support for facebook and google accounts |
[eluser]Citizen[/eluser]
I'm working on my first CL project and I'm looking to keep development as speedy as possible. What I'd like to do is have three options for signup: 1. Normal email + password registration 2. Facebook account login 3. Google account login Here's what I've found, I'm hoping to get some feedback in terms of committing to using these libraries: 1. Normal: http://konyukhov.com/soft/tank_auth/ 2. Facebook: http://www.haughin.com/code/facebook/ 3. Google Account: ??? Any suggestions, feedback, etc would be greatly appreciated!
[eluser]quasiperfect[/eluser]
use this http://code.google.com/p/lightopenid/ and u have google yahoo etc
[eluser]Boris Strahija[/eluser]
This library works great. One question though. How do you keep the session alive without passing the entire query string to every page? I did a successful login, but when I go to another page the data I got from Google is not there anymore.
[eluser]quasiperfect[/eluser]
@Boris just get the data and keep it on your own session or create a account with the data
[eluser]Boris Strahija[/eluser]
I could do that, but how do I check if the user is signed in? If there's no query string, the $openid variable has no data. And how do I sign out? Sorry about all the questions, but I'm no OpenID expert, so I could use some help.
[eluser]quasiperfect[/eluser]
u have examples in http://lightopenid.googlecode.com/files/...id-0.4.tgz u have u'r own session with a variable islogedin for example true if logedin false if not the logic is if is not authentificated u show the links to yahoo google etc after the login u add the data u got using openid to your own session so the logedin variable is true now on every page u verify that variable not the openid procces again
[eluser]Boris Strahija[/eluser]
I already looked at the examples, and that's fine. So you're saying the user authenticates with $openid->authUrl(), and when the page redirects I just write the variable "claimed_id:Openid:private" in my session/db/whatever, write the data I get back (email, name, etc.). How do I logout? I just delete my session? It just doen't feel right to me Are there any tutorials? I had a hard time finding any info on this.
[eluser]Citizen[/eluser]
[quote author="Boris Strahija" date="1297965626"]I already looked at the examples, and that's fine. So you're saying the user authenticates with $openid->authUrl(), and when the page redirects I just write the variable "claimed_id:Openid:private" in my session/db/whatever, write the data I get back (email, name, etc.). How do I logout? I just delete my session? It just doen't feel right to me Are there any tutorials? I had a hard time finding any info on this.[/quote] I'd just like to bump boris's question here because I'm running into the same thing.
[eluser]kristapsv[/eluser]
Hey, have you checked this,works on CI 1.7.2 and 2.0, at first glance looks good http://codeigniter.com/wiki/A3M_Account_...orization/ |
Welcome Guest, Not a member yet? Register Sign In |