@twurple/auth
Advanced tools
Comparing version 7.0.3 to 7.1.0-pre.0
@@ -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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
126165
3019
1
+ Added@twurple/api-call@7.1.0-pre.0(transitive)
+ Added@twurple/common@7.1.0-pre.0(transitive)
- Removed@twurple/api-call@7.0.3(transitive)
- Removed@twurple/common@7.0.3(transitive)
Updated@twurple/common@7.1.0-pre.0