Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong error msg for incorrect password during login #5114

Open
ananyaarun opened this issue Mar 16, 2019 · 11 comments
Open

Wrong error msg for incorrect password during login #5114

ananyaarun opened this issue Mar 16, 2019 · 11 comments
Labels
discussion enhancement explains that the issue is to improve upon one of our existing features

Comments

@ananyaarun
Copy link
Member

ananyaarun commented Mar 16, 2019

Description

The issue of not allowing null fields either for username or password during login was taken care of in #5087 , But when a user enters a correct user name (ie present in db) followed by an incorrect password, Instead of a msg saying wrong password this pops up.
loginerror

Solution

An error msg saying Pls enter correct password or incorrect password should pop up instead of this. I feel this error msg is misleading to a common user.

@ananyaarun
Copy link
Member Author

I'd like to work on this. Thanks :)

@grvsachdeva grvsachdeva added enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute labels Mar 17, 2019
@grvsachdeva
Copy link
Member

Sure, go ahead @ananyaarun

@ananyaarun
Copy link
Member Author

ananyaarun commented Mar 19, 2019

@gauravano , Can you tell me what This line exactly does ?

to solve this issue i replaced it with a flash warning msg and then a redirect

flash[:warning] = "Wrong password"
redirect_to '/login'

that solved the issue but other cases of login functionality seem to break by this method not sure why.

@grvsachdeva
Copy link
Member

@gauravano , Can you tell me what This line exactly does ?

the line you referred take the control to here-

It behaves just as render template - https://stackoverflow.com/questions/5045222/difference-between-render-action-and-render-template

I think "Password is not valid" message is default one shown by rails authlogic?

@ananyaarun
Copy link
Member Author

ananyaarun commented Mar 20, 2019

Actually it doesnt show an understandable message. This is what comes.

login

I thought of replacing this render template with a flash msg followed by redirect.

"Password not valid" is fine but i felt the other parts are unnecessary ?

@grvsachdeva
Copy link
Member

I think flash message will not be that appropriate to inform/give message such as password validation or captcha fail, etc, as user can ignore flash message easily

@ananyaarun
Copy link
Member Author

Hmm makes sense, But isnt this msg a bit unrelated ? As in why display "1 error prohibited this user session from being saved " to an external user ?

@grvsachdeva
Copy link
Member

That's how devise show errors

@ananyaarun
Copy link
Member Author

Ok so if that's the case i assume we cant change it right ? So shall we let the error msg be then ?

@grvsachdeva
Copy link
Member

I think we can. Or, we can jump on it and implement our validation? @jywarren what do you think here?

@grvsachdeva grvsachdeva added discussion and removed help wanted requires help by anyone willing to contribute labels Mar 22, 2019
@ananyaarun
Copy link
Member Author

If its possible to change i definitely think "1 error prohibited user session from being saved" can be removed.
Actually i feel, Implementing our own validation is better. Not only this issue but there are several login/signup problems various user are reporting right ?

@stale stale bot added the stale label Oct 7, 2020
@publiclab publiclab deleted a comment from stale bot Oct 8, 2020
@stale stale bot removed the stale label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement explains that the issue is to improve upon one of our existing features
Projects
None yet
Development

No branches or pull requests

2 participants