Closed delCatta closed 2 years ago
You'll need to disable verify_account and verify_account_grace_period features too, as those depend on the create_account feature, so they pull it in automatically.
Isn't there a way to disable some routes? For example, make /create-account path not available. If you disable the feature, you cannot use it with internal_request in other parts of the application
I discovered that you can set the value of a rodauth route configuration to nil, for example:
create_account_route nil
This causes the rodauth router to ignore it and pass it to the Rails router, allowing you to easily handle the error
@brunoprietog I thought I knew everything there is to know about Rodauth, but you just taught me something new 🙂 This works because, when nil
is passed to r.is
, it doesn't match. BTW, I think showing this would be a useful addition to the Change route path official guide 😉
@delCatta Since the question was answered, I'm closing this one. In the future please use GitHub Discussions for usage questions 🙂
I would like to know how I can disable Account Creation.
I need this because I have one admin account that could create accounts.
Removing
:create_account
from theenable
inrodauth_main.rb
doen't seem to work...