Socket
Socket
Sign inDemoInstall

twitch-auth

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitch-auth - npm Package Compare versions

Comparing version 4.2.0-pre.1 to 4.2.0-pre.2

7

lib/helpers.d.ts

@@ -29,2 +29,9 @@ import { AccessToken } from './AccessToken';

/**
* Revokes an access token.
*
* @param clientId The client ID of your application.
* @param accessToken The access token.
*/
export declare function revokeToken(clientId: string, accessToken: string): Promise<void>;
/**
* Retrieves information about an access token.

@@ -31,0 +38,0 @@ *

@@ -103,2 +103,29 @@ "use strict";

/**
* Revokes an access token.
*
* @param clientId The client ID of your application.
* @param accessToken The access token.
*/
function revokeToken(clientId, accessToken) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, twitch_api_call_1.callTwitchApi({
type: twitch_api_call_1.TwitchApiCallType.Auth,
url: 'revoke',
method: 'POST',
query: {
client_id: clientId,
token: accessToken
}
})];
case 1:
_a.sent();
return [2 /*return*/];
}
});
});
}
exports.revokeToken = revokeToken;
/**
* Retrieves information about an access token.

@@ -105,0 +132,0 @@ *

2

lib/index.d.ts
export { AccessToken } from './AccessToken';
export { exchangeCode, getAppToken, getTokenInfo, refreshUserToken } from './helpers';
export { exchangeCode, getAppToken, getTokenInfo, refreshUserToken, revokeToken } from './helpers';
export { TokenInfo, TokenInfoData } from './TokenInfo';

@@ -4,0 +4,0 @@ export { AuthProvider, AuthProviderTokenType } from './AuthProvider/AuthProvider';

@@ -10,2 +10,3 @@ "use strict";

exports.refreshUserToken = helpers_1.refreshUserToken;
exports.revokeToken = helpers_1.revokeToken;
var TokenInfo_1 = require("./TokenInfo");

@@ -12,0 +13,0 @@ exports.TokenInfo = TokenInfo_1.TokenInfo;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var deprecate_1 = require("@d-fischer/deprecate");
var twitch_api_call_1 = require("twitch-api-call");

@@ -10,2 +11,3 @@ /** @deprecated Use `exchangeCode` instead. */

return tslib_1.__generator(this, function (_a) {
deprecate_1.default('[twitch-auth] getUserAccessToken', 'Use exchangeCode instead.');
return [2 /*return*/, twitch_api_call_1.callTwitchApi({

@@ -31,2 +33,3 @@ type: twitch_api_call_1.TwitchApiCallType.Auth,

return tslib_1.__generator(this, function (_a) {
deprecate_1.default('[twitch-auth] refreshUserAccessToken', 'Use refreshUserToken instead.');
return [2 /*return*/, twitch_api_call_1.callTwitchApi({

@@ -51,2 +54,3 @@ type: twitch_api_call_1.TwitchApiCallType.Auth,

return tslib_1.__generator(this, function (_a) {
deprecate_1.default('[twitch-auth] getAppAccessToken', 'Use getAppToken instead.');
return [2 /*return*/, twitch_api_call_1.callTwitchApi({

@@ -53,0 +57,0 @@ type: twitch_api_call_1.TwitchApiCallType.Auth,

{
"name": "twitch-auth",
"version": "4.2.0-pre.1",
"version": "4.2.0-pre.2",
"description": "Authenticate with Twitch and stop caring about refreshing tokens.",

@@ -32,11 +32,7 @@ "keywords": [

"dependencies": {
"@d-fischer/deprecate": "^2.0.1",
"@d-fischer/shared-utils": "^2.3.1",
"tslib": "^2.0.0"
"tslib": "^2.0.0",
"twitch-api-call": "^4.2.0-pre.2"
},
"devDependencies": {
"twitch-api-call": "^4.2.0-pre.1"
},
"peerDependencies": {
"twitch-api-call": "^4.2.0"
},
"files": [

@@ -52,3 +48,3 @@ "LICENSE",

},
"gitHead": "c55950bf6a8c5f8d06c10e3e87d47bb5be0c1ceb"
"gitHead": "77e3c7ebe0b5b53ad4ad5fcd11c0981f446300d6"
}

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