# cat config.rurequire "roda"class RodauthApp < Roda secret = ENV['SESSION_SECRET'] plugin :sessions, secret: secret # If using Rodauth in a non-Roda application # plugin :middleware # JSON API #plugin :json #plugin :json_parser plugin :rodauth do enable :login, :logout, :verify_account enable :webauthn, :otp, :recovery_codes hmac_secret secret # JSON API #enable :jwt #jwt_secret secret #only_json? false end route do |r| r.rodauth rodauth.require_authentication # If using Rodauth in a Roda application # Your app code here endend# If using Rodauth in a non-Roda application# use RodauthApp# If using Rodauth in a Roda applicationrun RodauthApp
Rodauth is Ruby's most advanced authentication framework. Find outwhy you should use it.