twitch-auth
Advanced tools
Comparing version 4.2.0-pre.1 to 4.2.0-pre.2
@@ -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 @@ * |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
92218
0
2168
0
4
+ Added@d-fischer/deprecate@^2.0.1
+ Addedtwitch-api-call@^4.2.0-pre.2
+ Added@d-fischer/deprecate@2.0.2(transitive)