We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eae036b commit 2b258fdCopy full SHA for 2b258fd
packages/authentication-local/src/strategy.ts
@@ -45,6 +45,10 @@ export class LocalStrategy extends AuthenticationBaseStrategy {
45
46
async findEntity (username: string, params: Params) {
47
const { entityUsernameField, service, errorMessage } = this.configuration;
48
+ if (!username) { // don't query for users without any condition set.
49
+ throw new NotAuthenticated(errorMessage);
50
+ }
51
+
52
const query = await this.getEntityQuery({
53
[entityUsernameField]: username
54
}, params);
0 commit comments