We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c746f4 commit a0b6b11Copy full SHA for a0b6b11
app/graphql/mutations/login.rb
@@ -10,7 +10,8 @@ class Login < BaseMutation
10
argument :webauthn_response, GraphQL::Types::JSON, required: false
11
12
def resolve(email:, password: nil, webauthn_response: nil)
13
- user = User.find_by!(email: email)
+ user = User.find_by(email: email)
14
+ raise GraphqlErrors::AuthenticationFailedError, "Invalid email or password" unless user
15
16
authenticate!(user:, password:, webauthn_response:)
17
0 commit comments