🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@accounts/client

Package Overview
Dependencies
Maintainers
5
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accounts/client - npm Package Compare versions

Comparing version

to
0.0.7

8

lib/AccountsClient.js

@@ -157,3 +157,4 @@ 'use strict';

value: function user() {
return this.getState().get('user').toJS();
var user = this.getState().get('user');
return user ? user.toJS() : null;
}

@@ -344,3 +345,3 @@ }, {

case 27:
_context7.next = 31;
_context7.next = 32;
break;

@@ -351,4 +352,5 @@

this.clearUser();
throw new _common.AccountsError('no tokens provided');
case 31:
case 32:
case 'end':

@@ -355,0 +357,0 @@ return _context7.stop();

@@ -751,10 +751,19 @@ 'use strict';

});
_context21.next = 5;
_context21.prev = 3;
_context21.next = 6;
return _AccountsClient2.default.refreshSession();
case 5:
case 6:
_context21.next = 13;
break;
case 8:
_context21.prev = 8;
_context21.t0 = _context21['catch'](3);
expect(_context21.t0.message).toEqual('no tokens provided');
expect(_AccountsClient2.default.instance.clearTokens.mock.calls.length).toEqual(1);
expect(_AccountsClient2.default.instance.clearUser.mock.calls.length).toEqual(1);
case 7:
case 13:
case 'end':

@@ -764,3 +773,3 @@ return _context21.stop();

}
}, _callee21, undefined);
}, _callee21, undefined, [[3, 8]]);
})));

@@ -767,0 +776,0 @@ it('clears tokens, users and throws error if bad refresh token provided', _asyncToGenerator(regeneratorRuntime.mark(function _callee22() {

@@ -39,2 +39,3 @@ 'use strict';

homePath: '/',
signOutPath: '/',
// TODO enable all of these

@@ -57,5 +58,5 @@ // onSubmitHook: () => {},

onSignedOutHook: function onSignedOutHook() {
return (0, _redirect2.default)(_AccountsClient2.default.options().homePath);
return (0, _redirect2.default)(_AccountsClient2.default.options().signOutPath);
},
loginOnSignUp: true
});

@@ -18,3 +18,3 @@ 'use strict';

isLoading: false,
user: (0, _immutable.Map)(),
user: null,
loggingIn: false

@@ -41,3 +41,3 @@ });

{
return state.set('user', (0, _immutable.Map)());
return state.set('user', null);
}

@@ -44,0 +44,0 @@ case LOGGING_IN:

{
"name": "@accounts/client",
"version": "0.0.6",
"version": "0.0.7",
"description": "Fullstack authentication and accounts-management",

@@ -67,3 +67,3 @@ "main": "lib/index.js",

"dependencies": {
"@accounts/common": "^0.0.6",
"@accounts/common": "next",
"immutable": "^3.8.1",

@@ -70,0 +70,0 @@ "jwt-decode": "^2.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet