Skip to content

Commit fbd6e6f

Browse files
authored
Merge pull request #110 from kamilkisiela/fix-userObject-validation
Fix: invalid key in User object validation
2 parents 3e2d423 + adfd22b commit fbd6e6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/client/src/AccountsClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { hashPassword } from './encryption';
3131
import type { TransportInterface } from './TransportInterface';
3232
import type { TokenStorage, AccountsClientConfiguration } from './config';
3333

34-
const isValidUserObject = (user: PasswordLoginUserIdentityType) => has(user, 'user') || has(user, 'email') || has(user, 'id');
34+
const isValidUserObject = (user: PasswordLoginUserIdentityType) => has(user, 'username') || has(user, 'email') || has(user, 'id');
3535

3636
const ACCESS_TOKEN = 'accounts:accessToken';
3737
const REFRESH_TOKEN = 'accounts:refreshToken';

0 commit comments

Comments
 (0)