Ask A Question

Notifications

You’re not receiving notifications from this thread.

Professional grade authentication with a single command (in rails 5)

S C asked in Rails

I've built authentication a few times now, and every time it's been 99.9% the same (save for a few tweaks in form validations etc). The machinery has been more or less identical to that found in the Michael Hartl tutorial (with 'remember me', account activation and password reset)

I was wondering if there's a command that can build all this for me, so I don't need to do it manually every time?

I know of gems like devise, but have heard they make it harder to configure things. I already find rails hard to configure, so I would like to stick to 'manual' authentication

If the answer is 'no', could I make a rake task that will do everything for me, then just copy that rake task into any new app and run it to build authentication that way?

Thanks in advance for any help

Reply

Yep! You can do it with a Rails application template like the one I built called Jumpstart: https://github.com/excid3/jumpstart

This episode talks about how to build your own: https://gorails.com/episodes/rails-application-templates

You'd just copy over all your code into a template and use it every time you create a new app.

Reply

Very cool! Thanks so much. I'll give it a go and report back

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,265+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.