Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Passport github js,用户代理错误_Javascript_Node.js_Github_Oauth_Passport.js - Fatal编程技术网

Javascript Passport github js,用户代理错误

Javascript Passport github js,用户代理错误,javascript,node.js,github,oauth,passport.js,Javascript,Node.js,Github,Oauth,Passport.js,昨天我可以通过Passport.js和Passport github模块成功登录我的应用程序,今天我收到这样一个错误: 500无法获取用户配置文件(状态:403数据:{“消息”:“缺少或无效的用户代理字符串。请参阅http://developer.github.com/v3/#user-需要代理“}) 那么还有其他人得到了吗 这是gihub oauth政策的变化吗 我们是否需要在passport github/node oauth模块上对此做出贡献?只需在您的策略中添加一个用户代理: new G

昨天我可以通过Passport.jsPassport github模块成功登录我的应用程序,今天我收到这样一个错误:

500无法获取用户配置文件(状态:403数据:{“消息”:“缺少或无效的用户代理字符串。请参阅http://developer.github.com/v3/#user-需要代理“})

那么还有其他人得到了吗

这是gihub oauth政策的变化吗


我们是否需要在passport github/node oauth模块上对此做出贡献?

只需在您的策略中添加一个用户代理:

new GitHubStrategy({
        clientID: <githubClientID>,
        clientSecret: <githubClientSecret>,
        callbackURL: <callback>,
        customHeaders: {"User-Agent" : <your agent string>}
      },
      findOrCreateUserByOAuth
    )
新策略({
客户ID:,
客户机密:,
callbackURL:,
customHeaders:{“用户代理”:}
},
findOrCreateUserByOAuth
)

从4月24日起,.

只需在您的策略中添加一个用户代理即可:

new GitHubStrategy({
        clientID: <githubClientID>,
        clientSecret: <githubClientSecret>,
        callbackURL: <callback>,
        customHeaders: {"User-Agent" : <your agent string>}
      },
      findOrCreateUserByOAuth
    )
新策略({
客户ID:,
客户机密:,
callbackURL:,
customHeaders:{“用户代理”:}
},
findOrCreateUserByOAuth
)

自年月24日起。

在哪里可以找到此用户代理字符串?在哪里可以找到此用户代理字符串?