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 - 07-21-2011

[eluser]Ben Edmunds[/eluser]
Citizen,

Storing the salts separately in the database is not any more secure, it just helps if you need to integrate with any other auth systems or if your porting an existing system to Ion Auth.

Ion Auth v1 has custom config settings that will need to be updated. Ion Auth v2 will inherit the settings from your email config file.


Thanks for the feedback!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-21-2011

[eluser]austintbiggs[/eluser]
For my application to function the way I wish I require user preferences; What do you think the best approach to this would be? Add the preferences inside the meta table? or create a table that functions like the meta table for preferences? I'm leaning towards the latter.

The only issue? I'm not sure how to incorporate the preferences table without breaking Ion Auth; I realize work on Ion Auth 2 is underway and as you've mentioned it will be extendable. This is a feature that I'm trying to incorporate "immediately", but will also help develop for Ion Auth 2 if you need help, suggestions, or testers..

And now that I've rambled on for far too long, I guess my question really is how would I add a second table identical to the user's meta table to hold nothing, but preferences? Do I just add those functions to the library after adding the necessary Database Schema?

And and All help is appreciated!

Austin.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-21-2011

[eluser]Ben Edmunds[/eluser]
I'd recommend putting that in the meta table; that's a perfect use case for the meta table.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-21-2011

[eluser]austintbiggs[/eluser]
[quote author="Citizen" date="1311280486"]One small suggestion: you might to include the adding of ion tables as part of the installation portion of the user guide. The problem with just running ion_auth.sql through phpmyadmin is that it doesn't add your CI table prefix.[/quote]

Since Ben is so busy, I decided to make a few quick edits to the pre-existing sql to include prefixes and I'll attempt to make a few edits to the library to let it utilize prefixes using a configuration key.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-21-2011

[eluser]Ben Edmunds[/eluser]
Thanks Austin!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-21-2011

[eluser]Citizen[/eluser]
[quote author="austintbiggs" date="1311293541"][quote author="Citizen" date="1311280486"]One small suggestion: you might to include the adding of ion tables as part of the installation portion of the user guide. The problem with just running ion_auth.sql through phpmyadmin is that it doesn't add your CI table prefix.[/quote]

Since Ben is so busy, I decided to make a few quick edits to the pre-existing sql to include prefixes and I'll attempt to make a few edits to the library to let it utilize prefixes using a configuration key.[/quote]
Wouldn't it make more sense to create an install controller using CI's Database Forge Class?

http://ellislab.com/codeigniter/user-guide/database/forge.html

Then, we woudn't have to worry about having a separate .sql file for postgre vs mysql vs mssql since it uses the CI db abstraction layer.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-21-2011

[eluser]Ben Edmunds[/eluser]
Personally I don't think it's worth the trouble to make an installer.

Ion Auth is a library that programmers integrate into their projects to assist them with building out their authentication. It's not meant to be something that non-programmers can just drop-in.


Thanks though!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-21-2011

[eluser]austintbiggs[/eluser]
[quote author="Ben Edmunds" date="1311291965"]I'd recommend putting that in the meta table; that's a perfect use case for the meta table.[/quote]

and putting preferences in there won't slow down authentication right?


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-21-2011

[eluser]Ben Edmunds[/eluser]
austintbiggs,

As long as you don't add a table (just use the meta table) it won't add any measurable performance decrease.

If you add another table it will slow it down a little because you have to join an additional table.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-25-2011

[eluser]gmoore[/eluser]
Hey Ben, et al

I'm hoping to use Ion Auth for a Codeigniter application, but I'm unsure of exactly how to structure the tables appropriately. Basically, I have a few different types of users each with different attributes. How would one build this out with just a single meta table?

Some ideas were offered here ( http://stackoverflow.com/questions/6240059/create-user-roles-and-profiles-in-codeigniter-using-ion-auth ) but none seem particularly elegant or ideal. Is there a a better way? Can I easily work with multiple meta tables (e.g. meta_type1, meta_type2, etc.) somehow?

A related issue pertains to the "identity" config parameter for login etc. How could I have the identity be email for one user type, and username for another?

Thanks in advance for any tips/advice/ideas. I'm interested to hear what you think Ben, but also what others have done to build in this kind of functionality.