Closed jgthms closed 6 months ago
My rodauth_app.rb
configuration is:
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
if request.path.start_with?("/admin")
rodauth(:admin).require_account
end
# require MFA if the user is logged in and has MFA setup
if rodauth(:admin).uses_two_factor_authentication?
rodauth(:admin).require_two_factor_authenticated
end
end
end
You appear to be using rodauth-rails, so please open a discussion in the rodauth-rails repository: https://github.com/janko/rodauth-rails/discussions/new/choose
Only post an issue here if you can reproduce the bug in Rodauth itself (without rodauth-rails).
Sorry! Wrong repo indeed.
Hi and thanks for creating this library.
I am developing an app with both a
main
account type, and anadmin
one. I've succesfully followed these instructions to create both account types.After finalising all the website features, I decided to reset the database with
rake db:reset
to see how the app would behave on a fresh install.After creating a new![image](https://github.com/jeremyevans/rodauth/assets/1254808/fb0e6814-62a1-4eea-848b-ec44fc64547d)
admin
account, I'm running into this error:My![image](https://github.com/jeremyevans/rodauth/assets/1254808/fe8d0428-7905-416c-9845-e94de937a5d4)
rodauth_admin.rb
configuration looks like this:Did I miss a step somewhere?