effortless-mgmt / EffortlessBackend

https://www.effortless.dk/
1 stars 0 forks source link

Failed login results in Error Code 500 #92

Open algorythm opened 5 years ago

algorythm commented 5 years ago

When logging in with invalid credentials, the HTTP result is 500.

The given error is:

InvalidOperationException: No authentication handler is registered for the scheme 'Username or password is incorrect.'. The registered schemes are: Bearer. Did you forget to call AddAuthentication().Add[SomeAuthHandler]("Username or password is incorrect.",...)?

It seems the error have to do with authentication using credentials aren't added as a valid authentication method (only tokens). The error happens in the AuthController when forbidding after wrongful credentials have been given.

This issue will get resolved when we make a separate OAuth server (#42) with Identity Server.

Links