Skip to content

Commit 94db702

Browse files
committed
fix: fix isEmailVerified typings
1 parent 3df1673 commit 94db702

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/auth/src/AuthProvider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class AuthProvider extends React.Component<AuthProviderProps, AuthProviderState>
5555

5656
const authState = authClient.getState();
5757
const isAuthorized = authClient.checkIsAuthorized();
58-
const isEmailVerified = authClient.checkIsEmailVerified && authClient.checkIsEmailVerified();
58+
const isEmailVerified =
59+
authClient.checkIsEmailVerified && (authClient.checkIsEmailVerified() as boolean | undefined);
5960

6061
this.setState({ isAuthorized, isEmailVerified, authState });
6162
};

packages/auth/test/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ export const DummyAuthClient = (): IAuthClient => {
4646
return externalAuth.logout();
4747
});
4848

49+
const getTokenInfo = jest.fn(() => {
50+
return {};
51+
});
52+
4953
return {
54+
getTokenInfo,
5055
getState,
5156
setState,
5257
purgeState,

0 commit comments

Comments
 (0)