New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eazy-auth

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eazy-auth - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

66

auth/saga.js

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

function authenticateWithStorageToken() {
var lsAccessToken, lsRefreshToken, me, _ref4, _ref5, user, _ref5$, accessToken, refreshToken, expires;
var lsAccessToken, lsRefreshToken, me, _ref4, _ref5, user, _ref5$, accessToken, refreshToken, refreshExpires, refreshed, expires;

@@ -595,3 +595,3 @@ return _regenerator2.default.wrap(function authenticateWithStorageToken$(_context17) {

if (!lsAccessToken) {
_context17.next = 34;
_context17.next = 48;
break;

@@ -623,8 +623,42 @@ }

refreshToken = _ref5$.refreshToken;
_context17.next = 23;
refreshExpires = _ref5$.expires;
refreshed = _ref5$.refreshed;
expires = void 0;
// Save new tokens in storage when me call was refreshed
if (!refreshed) {
_context17.next = 35;
break;
}
expires = refreshExpires;
_context17.next = 28;
return lsStoreAccessToken(accessToken);
case 28:
_context17.next = 30;
return lsStoreRefreshToken(refreshToken);
case 30:
if (!expires) {
_context17.next = 33;
break;
}
_context17.next = 33;
return lsStoreExpires(expires);
case 33:
_context17.next = 38;
break;
case 35:
_context17.next = 37;
return lsGetExpires();
case 23:
case 37:
expires = _context17.sent;
_context17.next = 26;
case 38:
_context17.next = 40;
return (0, _effects.put)({

@@ -635,10 +669,10 @@ type: _actions.AUTH_WITH_TOKEN_SUCCESS,

case 26:
_context17.next = 34;
case 40:
_context17.next = 48;
break;
case 28:
_context17.prev = 28;
case 42:
_context17.prev = 42;
_context17.t0 = _context17['catch'](11);
_context17.next = 32;
_context17.next = 46;
return (0, _effects.put)({

@@ -649,11 +683,11 @@ type: _actions.AUTH_WITH_TOKEN_FAILURE,

case 32:
_context17.next = 34;
case 46:
_context17.next = 48;
return lsRemoveTokens();
case 34:
_context17.next = 36;
case 48:
_context17.next = 50;
return (0, _effects.put)({ type: _actions.BOOTSTRAP_AUTH_END });
case 36:
case 50:
case 'end':

@@ -663,3 +697,3 @@ return _context17.stop();

}
}, _marked17, this, [[11, 28]]);
}, _marked17, this, [[11, 42]]);
}

@@ -666,0 +700,0 @@

{
"name": "eazy-auth",
"version": "0.4.0",
"version": "0.5.0",
"description": "Easy auth stuff with redux",

@@ -5,0 +5,0 @@ "main": "./index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc