I am currently using OmniAuth for its’ CAS strategy which is the default method of authentication in my app. I want to provide an additional method of authentication with user_name and password through the OmniAuth Identity strategy. I have read in its’ documentation that it is meant to be used with a separate model and not the existing model but I was wondering if it would break if I tried pointing it to the existing current model.
The reason why I want to do it like this is that my app depends on the user filling out a registration form that populates the User model. Currently the CAS strategy just authenticates the user and signs them in if they already exist in the database and points them to users#new where they fill out their information.
If I were to implement OmniAuth Identity I would require new users to fill out a form with their username and password first to authenticate them and then redirect them to the User model form. If I were a user this would annoy me. I know it would be a one-time thing only but I would like to avoid it if possible. Is there a good way of combining these two steps somehow?
I know that Devise stores password info in the current User model but it is more feature heavy than I need it to be so I would prefer to stick with OmniAuth.
Sorry if the answer is obvious I am pretty new to rails.
Using OmniAuth Identity out of the box, you’d collect all the registration information into the Identity model, then use omniauth to pass all that info along to your
sessions#createaction where you’d then build a User model from it.You can use OmniAuth identity to store the registration info straight to the User model, but them you’re not getting the benefit of using an authorization system.