diff --git a/keyserver/src/user/login.js b/keyserver/src/user/login.js --- a/keyserver/src/user/login.js +++ b/keyserver/src/user/login.js @@ -109,7 +109,10 @@ fetchCallUpdateOlmAccount('content', markKeysAsPublished), fetchCallUpdateOlmAccount('notifications', markKeysAsPublished), ]); - return identity_info; + return { + userId: identity_info.userID, + accessToken: identity_info.accessToken, + }; } catch (e) { console.warn('Failed to login user: ' + getMessageForException(e)); try { @@ -128,7 +131,10 @@ fetchCallUpdateOlmAccount('content', markKeysAsPublished), fetchCallUpdateOlmAccount('notifications', markKeysAsPublished), ]); - return identity_info; + return { + userId: identity_info.userID, + accessToken: identity_info.accessToken, + }; } catch (err) { console.warn('Failed to register user: ' + getMessageForException(err)); throw new ServerError('identity_auth_failed'); diff --git a/lib/types/identity-service-types.js b/lib/types/identity-service-types.js --- a/lib/types/identity-service-types.js +++ b/lib/types/identity-service-types.js @@ -13,7 +13,7 @@ import { tShape } from '../utils/validation-utils.js'; export type UserLoginResponse = { - +userId: string, + +userID: string, +accessToken: string, }; 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 @@ -43,7 +43,7 @@ const subscription = metadataEmitter.addListener( 'commServicesAuthMetadata', (authMetadata: UserLoginResponse) => { - userIDPromiseRef.current = Promise.resolve(authMetadata.userId); + userIDPromiseRef.current = Promise.resolve(authMetadata.userID); }, ); return () => subscription.remove();