Code Monkey home page Code Monkey logo

passport-youtube's People

Contributors

jozzhart avatar mavdi avatar ravenjohn avatar yanatan16 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

passport-youtube's Issues

Release 0.0.6 does not include last changes in Strategy

The method Strategy.prototype.authorizationParams in 0.0.6 has a less flexible code than the master branch.

// 0.0.6
Strategy.prototype.authorizationParams = function(options) {
  //  test, should be passed through options
  return {
    access_type : 'offline'
  }
}

// master
Strategy.prototype.authorizationParams = function(options) {
  var params = {};
  if (options.accessType) {
    params['access_type'] = options.accessType;
  }
  if (options.approvalPrompt) {
    params['approval_prompt'] = options.approvalPrompt;
  }
  return params;
}

Can you please make a 0.0.7 including those changes?
Thanks.

ps. without the approval_prompt flag, the refreshToken is not given back by the strategy, which can be problematic

Scope https://www.googleapis.com/auth/youtube.readonly doesn't work ?

If I request scope https://www.googleapis.com/auth/youtube it works fine, but if I change scope to https://www.googleapis.com/auth/youtube.readonly (the readonly one) it doesn't work?
Error:
failed to fetch user profile (status: 401 data:
...
Token invalid
...
at ../passport/passport-youtube test/node_modules/passport-youtube/lib/passport-youtube/strategy.js:55:28
at passBackControl (./passport/passport-youtube test/node_modules/passport-youtube/node_modules/passport-oauth/node_modules/oauth/lib/oauth2.js:105:9)
at IncomingMessage. (../passport/passport-youtube test/node_modules/passport-youtube/node_modules/passport-oauth/node_modules/oauth/lib/oauth2.js:124:7)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:910:16
at process._tickCallback (node.js:415:13)

Not returning refresh token

This strategy doesn't seem to be returning the refresh token. After taking a peek at the code, it looks like this is trying to use access_type: 'offline', but it doesn't seem to be working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.