Browse Source

fix: update to working twitch passport strategy (#5279)

pull/5290/head
Erik Bigler 2 years ago
committed by GitHub
parent
commit
9b40d60261
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions
  1. 2
      package.json
  2. 4
      server/modules/authentication/twitch/authentication.js
  3. 13
      yarn.lock

2
package.json

@ -150,7 +150,7 @@
"passport-openidconnect": "0.0.2", "passport-openidconnect": "0.0.2",
"passport-saml": "3.2.1", "passport-saml": "3.2.1",
"passport-slack-oauth2": "1.1.1", "passport-slack-oauth2": "1.1.1",
"passport-twitch-oauth": "1.0.0",
"passport-twitch-strategy": "2.2.0",
"pem-jwk": "2.0.0", "pem-jwk": "2.0.0",
"pg": "8.4.1", "pg": "8.4.1",
"pg-hstore": "2.3.4", "pg-hstore": "2.3.4",

4
server/modules/authentication/twitch/authentication.js

@ -4,7 +4,7 @@
// Twitch Account // Twitch Account
// ------------------------------------ // ------------------------------------
const TwitchStrategy = require('passport-twitch-oauth').Strategy
const TwitchStrategy = require('passport-twitch-strategy').Strategy
const _ = require('lodash') const _ = require('lodash')
module.exports = { module.exports = {
@ -21,7 +21,7 @@ module.exports = {
providerKey: req.params.strategy, providerKey: req.params.strategy,
profile: { profile: {
...profile, ...profile,
picture: _.get(profile, 'avatar', '')
picture: _.get(profile, 'profile_image_url', '')
} }
}) })
cb(null, user) cb(null, user)

13
yarn.lock

@ -14697,7 +14697,7 @@ passport-oauth2@1.6.1, passport-oauth2@^1.6.0:
uid2 "0.0.x" uid2 "0.0.x"
utils-merge "1.x.x" utils-merge "1.x.x"
passport-oauth2@1.x.x, passport-oauth2@^1.2.0, passport-oauth2@^1.4.0, passport-oauth2@^1.5.0:
passport-oauth2@1.x.x, passport-oauth2@^1.4.0, passport-oauth2@^1.5.0:
version "1.5.0" version "1.5.0"
resolved "https://registry.yarnpkg.com/passport-oauth2/-/passport-oauth2-1.5.0.tgz#64babbb54ac46a4dcab35e7f266ed5294e3c4108" resolved "https://registry.yarnpkg.com/passport-oauth2/-/passport-oauth2-1.5.0.tgz#64babbb54ac46a4dcab35e7f266ed5294e3c4108"
integrity sha512-kqBt6vR/5VlCK8iCx1/KpY42kQ+NEHZwsSyt4Y6STiNjU+wWICG1i8ucc1FapXDGO15C5O5VZz7+7vRzrDPXXQ== integrity sha512-kqBt6vR/5VlCK8iCx1/KpY42kQ+NEHZwsSyt4Y6STiNjU+wWICG1i8ucc1FapXDGO15C5O5VZz7+7vRzrDPXXQ==
@ -14761,12 +14761,13 @@ passport-strategy@1.x.x, passport-strategy@^1.0.0:
resolved "https://registry.yarnpkg.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4" resolved "https://registry.yarnpkg.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4"
integrity sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ= integrity sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ=
passport-twitch-oauth@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/passport-twitch-oauth/-/passport-twitch-oauth-1.0.0.tgz#8ba20658ffe18dbeab2201547e0a2e6a459adaf1"
integrity sha512-sX/HZgRP320CICi+ZQn0MpKV8PiVcxuEOaLywOE2EiXQkkUm4glTgBbz9bsr7Ws7985fFmP+LgLIe0/HtMGucw==
passport-twitch-strategy@2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/passport-twitch-strategy/-/passport-twitch-strategy-2.2.0.tgz#8a9d78ef478de92d1164fa8d194ee76ff551e0f1"
integrity sha512-PjESpFVnJk6GIX2EOtkuyk01K81ACDG8IiLJu6yOtOyaMti24/afMtqBcqDrsKqz0RHrx206AfWcI6Q4Tvy4OQ==
dependencies: dependencies:
passport-oauth2 "^1.2.0"
node-fetch "^2.6.1"
passport-oauth2 "^1.5.0"
passport@0.4.1, passport@^0.4.1: passport@0.4.1, passport@^0.4.1:
version "0.4.1" version "0.4.1"

Loading…
Cancel
Save