Re: confirm_login_allowed in subclassed authentication returns wrong error message

34 views
Skip to first unread message
Message has been deleted

James Schneider

unread,
Feb 17, 2015, 4:33:00 PM2/17/15
to django...@googlegroups.com

You should raise the error in your custom user login form when attempting to authenticate the user, not directly from the custom user model or authentication backend.

-James

On Feb 17, 2015 12:20 PM, "Tomáš Sekanina" <sekanin...@gmail.com> wrote:
Hello, 

I have a custom user model and I need to extend the user authentication during login and found this solution: http://bit.ly/1u705o9  It would work great for me and I ended up implementing this . It works in a manner that it does not let such user log in, but raises a different error message which is: 'Sorry, that's not a valid username or password.'.  I tried posting this question on different forums but got no answer :(. It seems really simple so I do not see there a place for an error unless there is some problem with the custom user model. I will be glad for your opinion at least :).

Thank you in advance for any effort to solve this. 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/49e6d5be-4a4c-411d-8476-e851ea8f3f2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages