I haven't exactly clear how to deal with user authentication with merb. I've tryed to follow the wonderful screencasts on merbcamp and I've read several tuts and the official wiki and the doc for auth- core, auth-more, auth-slice-password. I am still stuck on this and i think it'd be an easy thing to achieve (as most things are, or at least should be with merb), but I am banging my head against the wall after 2 days. Now I'd like to have my user authenticate with their login and email instead of using the password field as stated by the default slice-password. I've found out that by default merb-auth-slice- password creates a login form for users to login through login and password params and then it uses the according strategy to let them login; accordingly it implements the logout as well. I've tryed to uncomment
Merb::Plugins.config[:"merb-auth"][:password_param] = :email in setup.rb this from what i've understand should have the slice-password use the email field in my db????Please correct me if I am wrong. So, basically, if I'd like to build my own simple two fields form in unauthenticathed.html.erb instead of using the slice-password how could i do that????Do I have to reinvent the wheel?I think that it shouldn't work this way??? I have understand that authentication happens in session update method (again correct me if i am wrong) It's not exactly clear on a first sight how to use or better create a form on that page and let my user authenticate by using my custom strategy and my own logic that should be simple from what stated in this post. So, to recap if i just want to use an existing db and have my users login by using the email and login field (both varchars) from that table what do i exactly need to do? 1) Do I actually have to add an authenticate!(request, params, *rest) method into merb/merb-auth/session.rb???? 2) Do i need to add in dependencies the auth-more with its default strategies?Don't guess so since i want to implement my one one 3)Do i need to add in dependencies the slice-password?That uses login and password for authentication? 4)Can i keep dependencies as they are and owerwrite the password params?HOW??????? Any feedback on this and how to exactly create a custom strategy following these specifications and add the form in the unauthenticated.html.erb view would be highly appreciated, oh, by the way I am using the default User.rb model to handle authentication. Thanks in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
