aboutsummaryrefslogtreecommitdiffstats
path: root/app/misc/rodauth_app.rb
diff options
context:
space:
mode:
authorsadbeast <sadbeast@sadbeast.com>2024-01-31 17:47:56 -0800
committersadbeast <sadbeast@sadbeast.com>2024-01-31 17:47:56 -0800
commit332ec93366315fa1ed7b4acd7a3407c96e8ddfa7 (patch)
tree6ae553317f12a7a6a29c849c8805ffab96436dc2 /app/misc/rodauth_app.rb
downloadtd-332ec93366315fa1ed7b4acd7a3407c96e8ddfa7.tar.gz
td-332ec93366315fa1ed7b4acd7a3407c96e8ddfa7.tar.bz2
initial mistakeHEADmain
Diffstat (limited to 'app/misc/rodauth_app.rb')
-rw-r--r--app/misc/rodauth_app.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/misc/rodauth_app.rb b/app/misc/rodauth_app.rb
new file mode 100644
index 0000000..6372422
--- /dev/null
+++ b/app/misc/rodauth_app.rb
@@ -0,0 +1,25 @@
+class RodauthApp < Rodauth::Rails::App
+ # primary configuration
+ configure RodauthMain
+
+ # secondary configuration
+ # configure RodauthAdmin, :admin
+
+ route do |r|
+ rodauth.load_memory # autologin remembered users
+
+ r.rodauth # route rodauth requests
+
+ # ==> Authenticating requests
+ # Call `rodauth.require_account` for requests that you want to
+ # require authentication for. For example:
+ #
+ # # authenticate /dashboard/* and /account/* requests
+ # if r.path.start_with?("/dashboard") || r.path.start_with?("/account")
+ # rodauth.require_account
+ # end
+
+ # ==> Secondary configurations
+ # r.rodauth(:admin) # route admin rodauth requests
+ end
+end