passport-youtube-v3
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -25,3 +25,2 @@ /** | ||
OAuth2Strategy.call(this, options, verify); | ||
this._oauth2.setAccessTokenName('key'); // Google calls access_tokens an api_key or just key | ||
this.name = 'youtube'; | ||
@@ -62,9 +61,9 @@ this._profileURL = options.profileURL || 'https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true'; | ||
var youtubeProfile = json.entry; | ||
var youtubeProfile = json.items && json.length && json.items[0]; | ||
var profile = { provider: 'youtube' }; | ||
if (youtubeProfile.items && youtubeProfile.items[0]) { | ||
profile.id = youtubeProfile.items[0].id; | ||
profile.displayName = youtubeProfile.items[0].snippet.title; | ||
if (youtubeProfile) { | ||
profile.id = youtubeProfile.id; | ||
profile.displayName = youtubeProfile.snippet.title; | ||
} | ||
@@ -71,0 +70,0 @@ |
{ | ||
"name": "passport-youtube-v3", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Youtube v3 API OAuth2 authentication strategy for Passport. Based on the passport-youtube module", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
6273
100