Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dudadev/ms-client-auth

Package Overview
Dependencies
Maintainers
5
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dudadev/ms-client-auth - npm Package Compare versions

Comparing version 1.2.4 to 1.3.0

33

lib/index.js

@@ -14,3 +14,4 @@ "use strict";

constructor({
autoAuthInterval
autoAuthInterval,
retries = 2
} = {}) {

@@ -20,2 +21,4 @@ this._listeners = [];

this._timeout = 0;
this._errorRetries = retries;
this._erroredCount = 0;

@@ -28,2 +31,6 @@ if (autoAuthInterval > 0) {

get token() {
if (!this.authDetails) {
return null;
}
return this.authDetails.value;

@@ -43,5 +50,9 @@ }

this._timeout = setTimeout(() => {
this.authenticateServices();
if (this._erroredCount < this._errorRetries) {
this.authenticateServices();
this._registerNextAuth();
this._registerNextAuth();
} else {
clearTimeout(this._timeout);
}
}, this._interval);

@@ -88,2 +99,4 @@ }

_fetchAuthDetails() {
var _this2 = this;
return _asyncToGenerator(function* () {

@@ -93,3 +106,9 @@ const response = yield window.fetch('/api/ms/auth', {

});
return response.json();
if (response.ok) {
return response.json();
}
_this2._erroredCount++;
return null;
})();

@@ -101,7 +120,9 @@ }

function create({
autoAuthInterval
autoAuthInterval,
retries
} = {}) {
return new AuthService({
autoAuthInterval
autoAuthInterval,
retries
});
}

2

package.json
{
"name": "@dudadev/ms-client-auth",
"version": "1.2.4",
"version": "1.3.0",
"description": "Client to authenticate Duda's microservices' clients",

@@ -5,0 +5,0 @@ "main": "lib/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