# cat config.ru
require "roda"

use Rack::Session::Cookie, :secret => ENV['SECRET']

class RodauthApp < Roda
  # If using Rodauth in a non-Roda application
  # plugin :middleware

  plugin :rodauth do
    enable :login, :logout, :change_password
  end

  route do |r|
    r.rodauth

    rodauth.require_authentication

    # If using Rodauth in a Roda application
    # Your app code here
  end
end

# If using Rodauth in a non-Roda application
# use RodauthApp

# If using Rodauth in a Roda application
run RodauthApp

Rodauth is an authentication and account management framework for Rack applications. Find out why you should use it.