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

@twurple/auth

Package Overview
Dependencies
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twurple/auth - npm Package Compare versions

Comparing version 7.0.3 to 7.1.0-pre.0

8

lib/helpers.external.js

@@ -11,3 +11,3 @@ "use strict";

code,
redirect_uri: redirectUri
redirect_uri: redirectUri,
};

@@ -21,3 +21,3 @@ }

client_id: clientId,
client_secret: clientSecret
client_secret: clientSecret,
};

@@ -32,3 +32,3 @@ }

client_secret: clientSecret,
refresh_token: refreshToken
refresh_token: refreshToken,
};

@@ -41,5 +41,5 @@ }

client_id: clientId,
token: accessToken
token: accessToken,
};
}
exports.createRevokeTokenQuery = createRevokeTokenQuery;

@@ -17,3 +17,3 @@ "use strict";

expiresIn: (_b = data.expires_in) !== null && _b !== void 0 ? _b : null,
obtainmentTimestamp: Date.now()
obtainmentTimestamp: Date.now(),
};

@@ -36,3 +36,3 @@ }

method: 'POST',
query: (0, helpers_external_1.createExchangeCodeQuery)(clientId, clientSecret, code, redirectUri)
query: (0, helpers_external_1.createExchangeCodeQuery)(clientId, clientSecret, code, redirectUri),
}));

@@ -52,3 +52,3 @@ }

method: 'POST',
query: (0, helpers_external_1.createGetAppTokenQuery)(clientId, clientSecret)
query: (0, helpers_external_1.createGetAppTokenQuery)(clientId, clientSecret),
}));

@@ -69,3 +69,3 @@ }

method: 'POST',
query: (0, helpers_external_1.createRefreshTokenQuery)(clientId, clientSecret, refreshToken)
query: (0, helpers_external_1.createRefreshTokenQuery)(clientId, clientSecret, refreshToken),
}));

@@ -85,3 +85,3 @@ }

method: 'POST',
query: (0, helpers_external_1.createRevokeTokenQuery)(clientId, accessToken)
query: (0, helpers_external_1.createRevokeTokenQuery)(clientId, accessToken),
});

@@ -211,3 +211,3 @@ }

['user_subscriptions', ['user:read:subscriptions']],
['user:edit:broadcast', ['channel:manage:broadcast', 'channel:manage:extensions']]
['user:edit:broadcast', ['channel:manage:broadcast', 'channel:manage:extensions']],
]);

@@ -256,2 +256,3 @@ /**

async function loadAndCompareTokenInfo(clientId, token, userId, loadedScopes, requestedScopeSets) {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
if ((requestedScopeSets === null || requestedScopeSets === void 0 ? void 0 : requestedScopeSets.length) || !userId) {

@@ -258,0 +259,0 @@ const userInfo = await getTokenInfo(token, clientId);

@@ -1,4 +0,4 @@

export type { AccessToken, AccessTokenMaybeWithUserId, AccessTokenWithUserId, ExpireableAccessToken } from './AccessToken';
export type { AccessToken, AccessTokenMaybeWithUserId, AccessTokenWithUserId, ExpireableAccessToken, } from './AccessToken';
export { accessTokenIsExpired, getExpiryDateOfAccessToken } from './AccessToken';
export { exchangeCode, getAppToken, getTokenInfo, getValidTokenFromProviderForUser, getValidTokenFromProviderForIntent, refreshUserToken, revokeToken } from './helpers';
export { exchangeCode, getAppToken, getTokenInfo, getValidTokenFromProviderForUser, getValidTokenFromProviderForIntent, refreshUserToken, revokeToken, } from './helpers';
export { TokenFetcher } from './TokenFetcher';

@@ -5,0 +5,0 @@ export { TokenInfo } from './TokenInfo';

@@ -1,2 +0,2 @@

import type { AccessToken } from '../AccessToken';
import { type AccessToken } from '../AccessToken';
import { type AuthProvider } from './AuthProvider';

@@ -3,0 +3,0 @@ /**

@@ -1,5 +0,5 @@

import type { MakeOptional } from '@d-fischer/shared-utils';
import { type MakeOptional } from '@d-fischer/shared-utils';
import { EventEmitter } from '@d-fischer/typed-event-emitter';
import { type UserIdResolvable } from '@twurple/common';
import type { AccessToken, AccessTokenMaybeWithUserId, AccessTokenWithUserId } from '../AccessToken';
import { type AccessToken, type AccessTokenMaybeWithUserId, type AccessTokenWithUserId } from '../AccessToken';
import { type AuthProvider } from './AuthProvider';

@@ -6,0 +6,0 @@ /**

@@ -71,3 +71,3 @@ "use strict";

...initialToken,
userId
userId,
});

@@ -122,3 +122,3 @@ if (!this._userTokenFetchers.has(userId)) {

...tokenToAdd,
scope: tokenInfo.scopes
scope: tokenInfo.scopes,
};

@@ -244,3 +244,3 @@ this.addUser(tokenInfo.userId, token, intents);

...tokenData,
userId
userId,
});

@@ -250,3 +250,3 @@ this.emit(this.onRefresh, userId, tokenData);

...tokenData,
userId
userId,
};

@@ -319,3 +319,3 @@ }

...newToken,
userId
userId,
};

@@ -339,3 +339,3 @@ }

...token,
userId
userId,
};

@@ -379,3 +379,3 @@ }

...previousToken,
scope
scope,
};

@@ -382,0 +382,0 @@ this._checkIntermediateUserRemoval(userId);

@@ -38,3 +38,3 @@ "use strict";

expiresIn: null,
obtainmentTimestamp: Date.now()
obtainmentTimestamp: Date.now(),
}

@@ -41,0 +41,0 @@ : accessToken;

{
"name": "@twurple/auth",
"version": "7.0.3",
"version": "7.1.0-pre.0",
"publishConfig": {

@@ -39,4 +39,4 @@ "access": "public"

"@d-fischer/typed-event-emitter": "^3.3.1",
"@twurple/api-call": "7.0.3",
"@twurple/common": "7.0.3",
"@twurple/api-call": "7.1.0-pre.0",
"@twurple/common": "7.1.0-pre.0",
"tslib": "^2.0.3"

@@ -43,0 +43,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

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