diff --git a/native/identity-service/identity-service-context-provider.react.js b/native/identity-service/identity-service-context-provider.react.js --- a/native/identity-service/identity-service-context-provider.react.js +++ b/native/identity-service/identity-service-context-provider.react.js @@ -14,8 +14,6 @@ type IdentityServiceClient, type UserDevicesOlmOutboundKeys, type UserLoginResponse, -} from 'lib/types/identity-service-types.js'; -import { ONE_TIME_KEYS_NUMBER, identityAuthResultValidator, } from 'lib/types/identity-service-types.js'; @@ -224,7 +222,12 @@ getOneTimeKeyValues(notificationsOneTimeKeys), ); const { userID, accessToken: token } = JSON.parse(registrationResult); - return { accessToken: token, userID, username }; + const identityAuthResult = { accessToken: token, userID, username }; + + return assertWithValidator( + identityAuthResult, + identityAuthResultValidator, + ); }, logInPasswordUser: async (username: string, password: string) => { await commCoreModule.initializeCryptoAccount();