Skip to content

Commit 0004679

Browse files
committed
remove user management
1 parent d3293ae commit 0004679

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

packages/client/__tests__/accounts-client.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,6 @@ describe('Accounts', () => {
245245
it('stores user in redux', async () => {
246246
Accounts.config({ history }, mockTransport);
247247
await Accounts.loginWithService('username', 'password');
248-
expect(Accounts.instance.getState().get('user')).toEqual(
249-
Map({
250-
...loggedInUser.user,
251-
})
252-
);
253248
});
254249

255250
it('stores tokens in redux', async () => {
@@ -401,7 +396,6 @@ describe('Accounts', () => {
401396
expect(localStorage.getItem('accounts:refreshToken')).toEqual(
402397
'refreshToken'
403398
);
404-
expect(Accounts.user()).toEqual(loggedInUser.user);
405399
});
406400
});
407401

@@ -535,7 +529,6 @@ describe('Accounts', () => {
535529
accessToken: 'newAccessToken',
536530
refreshToken: 'newRefreshToken',
537531
});
538-
expect(Accounts.user()).toEqual(impersonateResult.user);
539532
expect(Accounts.isImpersonated()).toBe(true);
540533
expect(Accounts.tokens());
541534
expect(Accounts.originalTokens()).toEqual({

packages/client/src/accounts-client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import config, { TokenStorage, AccountsClientConfiguration } from './config';
1717
import createStore from './create-store';
1818
import reducer, {
1919
loggingIn,
20-
setUser,
2120
clearUser,
2221
setTokens,
2322
clearTokens as clearStoreTokens,
@@ -154,7 +153,6 @@ export class AccountsClient {
154153
}
155154

156155
this.store.dispatch(setTokens(res.tokens));
157-
this.store.dispatch(setUser(res.user));
158156
return res;
159157
}
160158
}
@@ -278,7 +276,6 @@ export class AccountsClient {
278276

279277
await this.storeTokens(refreshedSession.tokens);
280278
this.store.dispatch(setTokens(refreshedSession.tokens));
281-
this.store.dispatch(setUser(refreshedSession.user));
282279
}
283280
} catch (err) {
284281
this.store.dispatch(loggingIn(false));
@@ -353,7 +350,6 @@ export class AccountsClient {
353350
this.store.dispatch(loggingIn(false));
354351
await this.storeTokens(response.tokens);
355352
this.store.dispatch(setTokens(response.tokens));
356-
this.store.dispatch(setUser(response.user));
357353

358354
const { onSignedInHook } = this.options;
359355

packages/common/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export interface TokensType {
3939

4040
export interface LoginReturnType {
4141
sessionId: string;
42-
user: UserObjectType;
4342
tokens: TokensType;
4443
}
4544

0 commit comments

Comments
 (0)