Ruby on Rails: How can I authenticate different user types from one place?

Posted by sscirrus on Stack Overflow See other posts from Stack Overflow or by sscirrus
Published on 2010-05-14T20:20:19Z Indexed on 2010/05/14 20:24 UTC
Read the original article Hit count: 194

Hi everyone!

This is my first post on Stack Overflow. I am trying to build a system that authenticates three types of user with completely different site experiences: Customers, Employers, and Vendors.

I'm thinking of using a polymorphic 'User' table (using AuthLogic) with username, password, and user_type (+ AuthLogic's other required fields). If this is a good way to go, how do I set this up so after authenticating an user_id with a user_type the standard way, I can direct the user to the page that's right for them?

Thanks.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about authentication