-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
Hi!
I have defined #active_for_authentication? method in the User model according to the Devise documentation which can return false when I would like to disable login for users.
def active_for_authentication?
super && ...
endTo show the reason why the user cannot log in I should define #inactive_message method in User model.
def inactive_message
"My message"
endBut it doesn't work with this gem because in Login mutation you have such conditions.
Instead of my message, I saw a message that confirmation instructions were sent to my email address.
Steps to reproduce
- Define those methods in your User model:
def active_for_authentication?
false
end
def inactive_message
"My message"
end- Try to log in.
Expected behavior
Show message from #inactive_message method.
By the way, #unauthenticated_message method also exists. Maybe it is worth supporting this method too.
Thank you!
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request