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

slicknode-apollo-link

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slicknode-apollo-link - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

21

dist/SlicknodeLink.js

@@ -264,13 +264,11 @@ "use strict";

if (!this.loadHeadersPromise) {
const accessToken = this.options.accessToken || this.getAccessToken();
if (accessToken) {
this.debug('Using valid access token');
return Promise.resolve({
Authorization: `Bearer ${accessToken}`,
});
}
this.loadHeadersPromise = new Promise((resolve, reject) => {
const accessToken = this.options.accessToken || this.getAccessToken();
const refreshToken = this.getRefreshToken();
if (accessToken) {
this.debug('Using valid access token');
resolve({
Authorization: `Bearer ${accessToken}`,
});
this.loadHeadersPromise = null;
return;
}
// We have no token, try to get it from API via next link

@@ -294,2 +292,3 @@ if (!accessToken && refreshToken) {

next: (result) => {
this.loadHeadersPromise = null;
if (result.data && result.data.refreshAuthToken) {

@@ -304,3 +303,2 @@ if (!this.validateAndSetAuthTokenSet(result.data.refreshAuthToken)) {

}
this.loadHeadersPromise = null;
resolve(this.hasAccessToken() ? {

@@ -318,2 +316,5 @@ Authorization: `Bearer ${this.getAccessToken()}`,

}
else {
this.debug('Wait for token refresh in other transaction');
}
return this.loadHeadersPromise;

@@ -320,0 +321,0 @@ }

{
"name": "slicknode-apollo-link",
"version": "1.0.2",
"version": "1.0.3",
"repository": "https://github.com/slicknode/slicknode-apollo-link.git",

@@ -5,0 +5,0 @@ "author": "Ivo Meißner <info@overtronic.com>",

Sorry, the diff of this file is not supported yet

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