Rodauth

Adds authentication and account management functionality with Rodauth, together with database tables, views and mailer.
Icons/chart bar
Used 18 times
Created by
J Janko Marohnić

Usage
After installing your can start by adding login and registration links to your navigation:

<% if rodauth.logged_in? %>
  <%= link_to "Sign out", rodauth.logout_path, method: :post %>
<% else %>
  <%= link_to "Sign in", rodauth.login_path %>
  <%= link_to "Sign up", rodauth.create_account_path %>
<% end %>

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION="https://railsbytes.com/script/z5OsNo"
Template Source

Review the code before running this template on your machine.

bundle_command "add rodauth-rails"
rails_command "generate rodauth:install"

if yes?("Would you like to run the migrations to create the new tables? [y/n]")
  rails_command "db:migrate"
end

if yes?("Do you want to copy views and to your application? [y/n]")
  rails_command "generate rodauth:views"
end
Comments

Sign up or Login to leave a comment.