Custom authentication first & OmniAuth later. Newbie here.

Hi guys.

I’m having an idea that will be my first Rails app that I’ll develop (i’m a newbie developer).

Thing is, I definitely want to have the login with Twitter/Google/Facebook functionality and I know that OmniAuth is a good library that achieves this. Thing is, I went through it’s documentation and it was a little too advanced for me, so I want to first write an authentication system myself (normal signup,signin etc) and then, later on, after reaching a certain stage where the app is functional, implement the OmniAuth plugin. I wanted to ask however, is this possible? If I work on my app and write my authentication system (simple one, with has_secure_password), will then be a big headache to implement OmniAuth functionality?

What aspects will I have to change? Will I be able to integrate it in my current authentication system which would use my methods defined in a helper (ex. current_user(), logged_in?(user) etc.)?

Thanks in advance :slight_smile:

Agis A. wrote in post #1047537:

Thing is, I definitely want to have the login with
Twitter/Google/Facebook
functionality and I know that OmniAuth is a good library that achieves
this. Thing is, I went through it's documentation and it was a little
too
advanced for me, so I want to first write an authentication system
myself
(normal signup,signin etc) and then, later on, after reaching a certain
stage where the app is functional, implement the OmniAuth plugin. I
wanted
to ask however, is this possible? If I work on my app and write my
authentication system (simple one, with has_secure_password), will then
be
a big headache to implement OmniAuth functionality?

On the one hand I'd say, yes build your own simple authentication system
to learn how it all works. However, if you are thinking this is going to
be easier to create than implementing OmniAuth I really think you'll be
disappointed.

OmniAuth is the easiest authentication system I've ever worked with.

If you want excellent, and detailed, help on how to set it up I'd highly
recommend Ryan Bates' screencasts on the subject:

http://railscasts.com/episodes/241-simple-omniauth?autoplay=true
http://railscasts.com/episodes/304-omniauth-identity?autoplay=true

Can OmniAuth be used for simple authentication except of 3rd party system? For example, can I implement basic signup/logging in functionality (with the users saved in my database) with OmniAuth? I want to have login w/ facebook,twitter etc but also I want to give users that don’t have an account on these sites to be able to signup on my site. I’m almost sure that OmniAuth is capable of doing that but just to be sure…

Thing is, I would like to write an authentication system (basically, I already did from the railstutorial.org site) just for practicing, and maybe later I will refactor it to use OmniAuth. Isn’t that a good idea?