Skip to content

DatabaseAuthenticationProvider is using EmailValidator to determine if input is an email #252

@JasonTypesCodes

Description

@JasonTypesCodes

DatabaseAuthenticationProvider is using EmailValidator to determine if input is an email and then based on the result determines how to query the database.

We don't have a context or annotation metadata to pass to the validator and are currently passing a null. We were lucky in that an older implementation of the class wasn't using that. The newer implementation does and this is holding us back from upgrading to Micronaut 2.5 and further.

My suggestion is to use an or condition in the DB query to check for username or email. That should yield the same results and doesn't make this implementation dependent on the EmailValidator class.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions