Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Commit 1f52b88

Browse files
committed
Dont return 401 when wrong creds
1 parent a96a47a commit 1f52b88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/graphql_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def authenticate
1818
@user = authenticate_with_http_basic { |username, password|
1919
user = User.where(username: username).first
2020

21-
return render plain: 'Invalid username', status: :unauthorized unless user
22-
return render plain: 'Invalid password', status: :authorized unless user.authenticate(password)
21+
return unless user
22+
return unless user.authenticate(password)
2323

2424
user
2525
}

0 commit comments

Comments
 (0)