diff --git a/keyserver/src/deleters/account-deleters.js b/keyserver/src/deleters/account-deleters.js --- a/keyserver/src/deleters/account-deleters.js +++ b/keyserver/src/deleters/account-deleters.js @@ -120,7 +120,6 @@ } return { currentUserInfo: { - id: viewer.id, anonymous: true, }, }; diff --git a/keyserver/src/fetchers/user-fetchers.js b/keyserver/src/fetchers/user-fetchers.js --- a/keyserver/src/fetchers/user-fetchers.js +++ b/keyserver/src/fetchers/user-fetchers.js @@ -279,7 +279,7 @@ async function fetchCurrentUserInfo(viewer: Viewer): Promise { if (!viewer.loggedIn) { - return ({ id: viewer.cookieID, anonymous: true }: CurrentUserInfo); + return ({ anonymous: true }: CurrentUserInfo); } const currentUserInfo = await fetchLoggedInUserInfo(viewer); return currentUserInfo; diff --git a/keyserver/src/responders/responder-validators.test.js b/keyserver/src/responders/responder-validators.test.js --- a/keyserver/src/responders/responder-validators.test.js +++ b/keyserver/src/responders/responder-validators.test.js @@ -46,7 +46,7 @@ describe('user responder validators', () => { it('should validate logout response', () => { - const response = { currentUserInfo: { id: '93078', anonymous: true } }; + const response = { currentUserInfo: { anonymous: true } }; expect(logOutResponseValidator.is(response)).toBe(true); response.currentUserInfo.anonymous = false; expect(logOutResponseValidator.is(response)).toBe(false); diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js --- a/keyserver/src/responders/user-responders.js +++ b/keyserver/src/responders/user-responders.js @@ -208,7 +208,6 @@ } return { currentUserInfo: { - id: viewer.id, anonymous: true, }, }; diff --git a/keyserver/src/session/cookies.js b/keyserver/src/session/cookies.js --- a/keyserver/src/session/cookies.js +++ b/keyserver/src/session/cookies.js @@ -571,7 +571,6 @@ threadInfos, userInfos: (values(userInfos).map(a => a): UserInfo[]), currentUserInfo: { - id: viewer.cookieID, anonymous: true, }, }: ServerSessionChange); diff --git a/keyserver/src/socket/socket.js b/keyserver/src/socket/socket.js --- a/keyserver/src/socket/socket.js +++ b/keyserver/src/socket/socket.js @@ -297,7 +297,6 @@ authErrorMessage.sessionChange = { cookie: this.viewer.cookiePairString, currentUserInfo: { - id: this.viewer.cookieID, anonymous: true, }, }; @@ -334,7 +333,6 @@ authErrorMessage.sessionChange = { cookie: anonViewer.cookiePairString, currentUserInfo: { - id: anonViewer.cookieID, anonymous: true, }, }; diff --git a/lib/types/user-types.js b/lib/types/user-types.js --- a/lib/types/user-types.js +++ b/lib/types/user-types.js @@ -89,11 +89,10 @@ }); export type LoggedOutUserInfo = { - +id: string, +anonymous: true, }; export const loggedOutUserInfoValidator: TInterface = - tShape({ id: t.String, anonymous: tBool(true) }); + tShape({ anonymous: tBool(true) }); export type CurrentUserInfo = LoggedInUserInfo | LoggedOutUserInfo; export const currentUserInfoValidator: TUnion = t.union([