EllisLab text mark
Advanced Search
2 of 26
2
   
A3M - Account Authentication & Authorization Module
Posted: 19 February 2010 05:45 AM   [ # 21 ]   [ Rating: 0 ]
Joined: 2009-04-30
6 posts
Peng Kong - 19 February 2010 03:40 AM

you mean u needed to add ; behind the $email? i don’t see how that helps but ok whatever works smile

try logging in using google in my demo https://it.euphoriatwentythree.com/projects/a3m/

does it work? because it works for my on my but not on yours… so im suspecting server configuration.

what version of php are you using? if you’re using 5.3 it doesn’t work for sure but i know the fix.

No no:

account/reset_password?email=
account/reset_password/&email;= 

I need to change “?” to “/&”, because else arguments are not recognizet as get (there are not in $_GET). The “;” must have been added by the forum (I don’t have it in my code before posting).

Here you can see my server configuration:

http://stuff.shy.cz/phpinfo.php 

Everything else in CodeIgniter works.

I ofcourse tried you demo, which worked.

Edit: Just ignore the “;” in first code, the bloody forum add it again.

 
Posted: 19 February 2010 06:24 AM   [ # 22 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

Ok that weird cause GET is after ? Usually… anyway.
So yep… sorry i didn’t test on other server configs and imp developing on a windows machines. My server is a Linux machine of cause.

So your only problem is that google isn’t working right?
Ok you gotta’ test if phpopenid package is working properly first.

Here’s how to do that:

1) Download http://openidenabled.com/files/php-openid/packages/php-openid-2.1.3.zip
2) Extract it and upload it to your server
3) In the examples folder there is a file called detect.php
  Simply run that file and see what is wrong.

oh duh ok… i think the reason is your cache/nonces cache/associations and cache/temp folders aren’t writable? if that isn’t the reason try the above 3 steps.

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 19 February 2010 08:01 AM   [ # 23 ]   [ Rating: 0 ]
Joined: 2009-04-30
6 posts
Peng Kong - 19 February 2010 11:24 AM

Ok that weird cause GET is after ? Usually… anyway.
So yep… sorry i didn’t test on other server configs and imp developing on a windows machines. My server is a Linux machine of cause.

Yes, when I changed it, it works fine, don’t know why the:

something/something?param=value

doesn’t pass the value. If anybody knows I would be glad to know too. smile

But

something/something/&param=value

works fine.

Peng Kong - 19 February 2010 11:24 AM

So your only problem is that google isn’t working right?
Ok you gotta’ test if phpopenid package is working properly first.

Here’s how to do that:

1) Download http://openidenabled.com/files/php-openid/packages/php-openid-2.1.3.zip
2) Extract it and upload it to your server
3) In the examples folder there is a file called detect.php
  Simply run that file and see what is wrong.

oh duh ok… i think the reason is your cache/nonces cache/associations and cache/temp folders aren’t writable? if that isn’t the reason try the above 3 steps.

I checked cache folders before and they are writable. You can see detect.php on following link:

http://stuff.shy.cz/php-openid-2.1.3/examples/detect.php

Seems to be problem with:
HTTP Fetching
An HTTP request was completed. Got 503 instead of the expected HTTP status code (200 or 206). The redirected URL was not returned. Unexpected data was returned.

I’ll be glad if you could look in to it.

 
Posted: 19 February 2010 09:53 AM   [ # 24 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

your server seems perfectly fine. that 503 thing isn’t important i think. cuz my server has the exact same thing but it still works. oh…. SSL is your page using SSL. for google it’s a must

ah yes im quite sure that’s the problem… no https on your signin page which is a must for google. you openid should work if you try with chi.mp or myopenid or try with AOL or myspace

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 19 February 2010 09:57 AM   [ # 25 ]   [ Rating: 0 ]
Joined: 2009-04-30
6 posts
Peng Kong - 19 February 2010 02:53 PM

your server seems perfectly fine. that 503 thing isn’t important i think. cuz my server has the exact same thing but it still works. oh…. SSL is your page using SSL. for google it’s a must

ah yes im quite sure that’s the problem… no https on your signin page which is a must for google. you openid should work if you try with chi.mp or myopenid or try with AOL or myspace

Ok, I try switch SSL on and different account.

I would be best I some error or log message is generated about need of SSL.

 
Posted: 19 February 2010 10:00 AM   [ # 26 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

ok let me look into that. i think the reason there isn’t error logs is cuz google doesn’t say it fails cuz u aren’t using ssl. but that’s the reason if you go google or just play around with it.

i think smile

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 26 February 2010 06:58 AM   [ # 27 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

Hey all,

check out this update https://it.euphoriatwentythree.com/projects/a3m/account/sign_in

1) Signin with...
Google,
Yahoo!,
AOL,
Twitter,
MySpace and other
OpenID Provider (tested with chi.mp and myopenid.com)

2) Connect with Facebook

Ok quick install instructions

1) Change .htaccess file
2) Application/config/config.php
  change base_url
3) application/modules/account/config/facebook.php
  application/modules/account/config/twitter.php
  application/modules/account/config/recaptcha.php
  change API keys
4) File permission
  system/logs
  system/cache/<all-3-folders>

hope i didnt miss anything gotta run! it’s friday smile

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 05 March 2010 05:02 AM   [ # 28 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

just this week i tired to implement oauth for this module.
there really isn’t any good help with oauth implement in PHP let alone CI.

but good news is i’ve finally managed to do it with http://code.google.com/p/oauth-php
(after having to painstakingly read line by line two oauth library =X)

working with just 1 controller and less then 200 lines of codes atm.
will be releasing it sometime next week!

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 05 March 2010 08:31 AM   [ # 29 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-18
64 posts
Peng Kong - 05 March 2010 10:02 AM

just this week i tired to implement oauth for this module.
there really isn’t any good help with oauth implement in PHP let alone CI.

but good news is i’ve finally managed to do it with http://code.google.com/p/oauth-php
(after having to painstakingly read line by line two oauth library =X)

working with just 1 controller and less then 200 lines of codes atm.
will be releasing it sometime next week!

Great! I am waiting for that! Keep up the good work!

 
Posted: 06 March 2010 01:26 PM   [ # 30 ]   [ Rating: 0 ]
Joined: 2010-03-06
2 posts

Hi! Great job. It’s very easy to use. I can’t help waiting on authorization:) Keep moving

 
Posted: 07 March 2010 05:21 PM   [ # 31 ]   [ Rating: 0 ]
Joined: 2010-03-07
12 posts

Hi guys,

First off I want to thank Peng Kong for making this awesome module. I just migrated my website (wow-wishlist.com) from using FreakAUTH to A3M and I am loving it. It is very professionally coded and is easy to implement.

The only criticism I can offer is the table structure, why are account_id’s BIGINT’s with a length of 40? There aren’t enough humans inhabiting earth to ever reach this kind of number. Hell I’d be surprised if there were that many ants, or insects in general :p

Anyway, the two main features I was missing was “Change Password” and “Forgot Password”, so I developed them myself.

I made sure I didn’t have to touch any of the existing A3M code so that it should be compatible with future updates and can easily be stripped out when Peng offers his own “Change Password” and “forgot Password” features.

To install:

- Download file (duh)
- Extract contents to your “./system/application/modules/account/” folder (you shouldn’t have to overwrite anything, just merge folders)
- Run account_reset.sql on your database
- Modify config/forgot_password.php to match your preferences
- Modify views
- done

Note that the views are really oriented at my own layout so you -will- have to change these.

Also note that I have not thoroughly tested my modifications yet, they seem to work properly on my end but bugs may still be present.

Looking forward to future updates for this module smile

 
Posted: 07 March 2010 09:45 PM   [ # 32 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

thanks for the comment haatan.

you have a point there with the big int 40. will change to just bigint in next ver.

“change password” and “forget password” is implemented in the previous ver. but i have yet to port it to the latest ver. because the lastest ver. is a total rewrite.

Shouldn’t take long to port so should definitely be done this week. (after oauth which i’m working on now)
I’ll also study your code and integrate everything i find.

I’m actually designing it in such a way that people who sign in with google yahoo etc don’t need to see a “change password” option… cause one point of openid is to not have your passwords strewn all over the net.

so the auth library will give you some kind of method to check “is_openid()” before presenting the change password option.

some goes for verification email. there will be a has_verified_email() function in the auth lib to allow us to check if user has at least ONE verified email. i’m designing it such that user’s don’t need to have a verified email unless you enforce it with has_verified_email().

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 08 March 2010 12:24 AM   [ # 33 ]   [ Rating: 0 ]
Joined: 2010-03-07
12 posts

Hi Peng,

Interested to hear about your total rewrite, will it essentially be a completely new module in no way resembling it’s previous version or will it be easy to upgrade from the current version to the new version?

I did make the change password feature with a check to see if the current user is using a password.. so it would only be usable by those who used the a3m registration mechanism.

Any idea when we may have a look at the new version? smile I will probably hold off updating my website until this version arrives.

And for the record, a regular INT will do, unless you think your website will be getting more than 2.147.483.647 users :p

 
Posted: 08 March 2010 01:21 AM   [ # 34 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

erm the ver. you’re using is most likely the total rewrite already (ver.0.4 see my 1st post for change log)

to be honest I’m not caring to much about backwards compatibility atm. i really should have a disclaimer somewhere stating this is a alpha kind of thing and not really meant for production usage (because many features are still not yet done).

anyway with proper separation of concerns, loose coupling and clean coding style you should be able to easily understand and fix (or add) anything yourself smile that really is the selling point of a3m =)

Upgrading shouldn’t be too hard down the road because i don’t see myself changing the existing features (because the point is usability, keep it simple!) e.g. Not to throw a huge form at users during registration. Sign in with google, yahoo, etc is already as simple as it can get so that shouldn’t change much either. Yep so upgrade will be adding new features rather then changing existing features.

I can’t really promise when the next release will be but I’m working on it full time so there should be some major releases every week.

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 08 March 2010 01:23 AM   [ # 35 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

keep the feedback coming and suggestions cause i’ll try to factor as many use cases as possible, if possible. smile thanks

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
2 of 26
2