CodeIgniter Forums
Ion Auth - Lightweight Auth System based on Redux Auth 2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Ion Auth - Lightweight Auth System based on Redux Auth 2 (/showthread.php?tid=27435)



Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]Ben Edmunds[/eluser]
Try

Code:
redirect('/auth/login', 'refresh');



Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]Zen Savona[/eluser]
still redirects me to localhost/AGN/localhost/AGN/auth/login. could it have something to do with my .htaccess file removing the /index.php/ from my URLs? in my global config file i have this:

Code:
$config['index_page'] = "";

im going to try it on a clean CI install.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]jayrulez[/eluser]
[quote author="Zen Savona" date="1271151147"]still redirects me to localhost/AGN/localhost/AGN/auth/login. could it have something to do with my .htaccess file removing the /index.php/ from my URLs? in my global config file i have this:

Code:
$config['index_page'] = "";

im going to try it on a clean CI install.[/quote]

Seems you have http:// missing somewhere


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]Ben Edmunds[/eluser]
Zen,

Also check your base_url...


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]Zen Savona[/eluser]
[quote author="Ben Edmunds" date="1271151519"]Zen,

Also check your base_url...[/quote]

i have it -semi- working using a clean CI install, i conclude that it's redirection does not like my non-CI mod_rewrite generated URLs. not exactly sure why though...

it still redirects me to the base url when i log in, then i manually have to go back to /index.php/auth, im assuming it is built on the pretense that when using this test controller, it is the default controller?


I think these problems can be overcome while just using it's components.


Thanks for the help.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]Ben Edmunds[/eluser]
No it doesn't need to be the default controller. Post your htaccess or you can see the one I use at http://github.com/benedmunds/CodeIgniter-Standard-Project/blob/master/.htaccess


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]Zen Savona[/eluser]
[quote author="Ben Edmunds" date="1271152030"]No it doesn't need to be the default controller. Post your htaccess or you can see the one I use at http://github.com/benedmunds/CodeIgniter-Standard-Project/blob/master/.htaccess[/quote]

my .htaccess is as follows
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /AGN/

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>

    ErrorDocument 404 /index.php
</IfModule>



Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]InsiteFX[/eluser]
Try changing this:
RewriteBase /AGN/

To this:
RewriteBase /

@Ben I think your right he is missing the http://
I would check the base_url

InsiteFX


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-12-2010

[eluser]Zen Savona[/eluser]
Thanks everyone for your help. I fixed the problem.

The project that i am using this for is just a little site for my own interest, and because i have done little groundwork, it is actually beneficial to me to work from Ben's standard project template. works fine now, i imported all of my other code into there and everything is running smoothly.


Once again i just want to say thanks Smile


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 04-13-2010

[eluser]Schumacher[/eluser]
Thx for the help erliere.
now ive gone to the next step, and that is the user creation.
It seemed fine, but then something came up, and i know how to work around it, but i just want to make sure that there isn't any other, smartere, way to do it.
I want to check if the username and the email already exists, and i know i can make this with a callback function which just tells me true or false on the return. then ill make a error message for it.
But is there any way easiere with this lovly library to do this ?
Would be nice to have the 2 in one function, so i can use the same instead of making 2 functions doing almost the same thing.