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

@tbhmens/twitch-auth

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tbhmens/twitch-auth - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "@tbhmens/twitch-auth",
"version": "1.0.2",
"version": "1.0.3",
"description": "An easy twitch openid connect interface.",

@@ -5,0 +5,0 @@ "main": "./src/auth.js",

@@ -119,7 +119,7 @@ /** @module TwitchAuth */

*
* @param {object} params - req.params
* @param {object} query - req.query
* @param {object} statestore - Server-sided storage object on the user
* @returns {Promise<{aud: string, exp: number, iat: number, iss: string | "https://id.twitch.tv/oauth2", sub: number, azp: string, email: string|undefined, email_verified: boolean|undefined, picture: string|undefined, preferred_username: string|undefined, updated_at: string|undefined}>} - Twitch User Object (If 'email_verified' is false then 'email' will be removed.)
*/
verify(params, statestore) {
verify(query, statestore) {
const copy = { nonce: statestore.twitchAuthNonce, state: statestore.twitchAuthState };

@@ -129,7 +129,7 @@ delete statestore.twitchAuthNonce;

return new Promise((resolve, reject) => {
if (params.state === copy.state && typeof params.state !== "undefined")
if (query.state === copy.state && typeof query.state !== "undefined")
axios.post(`token?${this.querify({
client_id: this.clientid,
client_secret: this.clientsecret,
code: params.code,
code: query.code,
grant_type: "authorization_code",

@@ -136,0 +136,0 @@ redirect_uri: this.redirect_uri

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