ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

A3M - Account Authentication & Authorization Module

February 06, 2010 5:48am

Subscribe [107]
  • #16 / Feb 11, 2010 9:54pm

    Peng Kong

    188 posts

    thanks steelaz & chiefchirpa.

    i’m giving the library a full re-factoring at the moment. Notice that everything is more or less stuffed into one controller and one language file at the moment. that’s kind of doesn’t scale too well. so the next ver (0.4) there will definitely be even more ‘separation’ meaning ‘cleaner’ codes.

    i’m also trying to consider a suggestion of creating a abstract layer (something like ci db layer) for authentication to further decouple anything i code i write. still not sure how’s that going to work out at this point, so if anyone has any ideas feel free to chip in 😊

  • #17 / Feb 12, 2010 2:23am

    Chris Lounsbury

    2 posts

    Hi Peng,

    I’m using your packet as a platform for learning, and was curious if the installation package will allow signups “out of the box” so to speak as provided.  I’m getting the welcome screen for A3M, but clicking on the Sign In or Sign Out links hits a 404 not found, looking for:

    http://localhost/a3m/account/signup

    Or if I have to build my own signup form 😊

  • #18 / Feb 12, 2010 2:43am

    Peng Kong

    188 posts

    check the htaccess and config.php baseurl.
    you shouldn’t be getting 404 when u click sign in
    signin and signup is both implemented.
    you can look at the demo i’ve setup http://it.euphoriatwentythree.com/projects/a3m/

  • #19 / Feb 13, 2010 1:40am

    Chris Lounsbury

    2 posts

    Thanks Peng!  I was able to get it working by modifying the base path and index filename 😊

  • #20 / Feb 18, 2010 4:18pm

    Alexander Weps

    5 posts

    Doesn’t work for me in several ways:

    need to change:

    $password_reset_url = site_url('account/reset_password?email='.$email.'&token;='.sha1($email.$time.$this->config->item('password_reset_secret')));

    to:

    $password_reset_url = site_url('account/reset_password/&email;='.$email.'&token;='.sha1($email.$time.$this->config->item('password_reset_secret')));

    and:

    $verification_url = site_url('account/verification?email='.$email.'&token;='.sha1($email.$this->config->item('verification_secret')));

    to:

    $verification_url = site_url('account/verification/&email;='.$email.'&token;='.sha1($email.$this->config->item('verification_secret')));

    Also logging using google account doesn’t work, when I click on google icon (http://poradnice.shy.cz/account/signin) i got redirected back with no error or log message.

  • #21 / Feb 18, 2010 10:40pm

    Peng Kong

    188 posts

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

    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.

  • #22 / Feb 19, 2010 5:45am

    Alexander Weps

    5 posts

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

    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:

    <a href="http://stuff.shy.cz/phpinfo.php">http://stuff.shy.cz/phpinfo.php</a>

    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.

  • #23 / Feb 19, 2010 6:24am

    Peng Kong

    188 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.

  • #24 / Feb 19, 2010 8:01am

    Alexander Weps

    5 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.

    Yes, when I changed it, it works fine, don’t know why the:
    <br /> something/something?param=value<br />
    doesn’t pass the value. If anybody knows I would be glad to know too. 😊

    But
    <br /> something/something/&param=value<br />
    works fine.

    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:
    <br /> <a href="http://stuff.shy.cz/php-openid-2.1.3/examples/detect.php">http://stuff.shy.cz/php-openid-2.1.3/examples/detect.php</a><br />

    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.

  • #25 / Feb 19, 2010 9:53am

    Peng Kong

    188 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

  • #26 / Feb 19, 2010 9:57am

    Alexander Weps

    5 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

    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.

  • #27 / Feb 19, 2010 10:00am

    Peng Kong

    188 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 😊

  • #28 / Feb 26, 2010 6:58am

    Peng Kong

    188 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 😊

  • #29 / Mar 05, 2010 5:02am

    Peng Kong

    188 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!

  • #30 / Mar 05, 2010 8:31am

    gvillavizar

    54 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!

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

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases