TokenError:未经授权的passport-google-oauth20

时间:2018-08-21 13:16:17

标签: express passport.js

当我尝试使用google oauth20时出现此错误 TokenError:未经授权     在Strategy.OAuth2Strategy.parseErrorResponse(C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ passport-oauth2 \ lib \ strategy.js:329:12)     在Strategy.OAuth2Strategy._createOAuthError(C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ passport-oauth2 \ lib \ strategy.js:376:16)     在C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ passport-oauth2 \ lib \ strategy.js:166:45     在C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ oauth \ lib \ oauth2.js:191:18     在passBackControl(C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ oauth \ lib \ oauth2.js:132:9)     在IncomingMessage。 (C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ oauth \ lib \ oauth2.js:157:7)     在IncomingMessage.emit(events.js:187:15)     在endReadableNT(_stream_visible.js:1081:12)     在process._tickCallback(internal / process / next_tick.js:63:19)

please help

2 个答案:

答案 0 :(得分:4)

clientSecret中有一个错字。如果您遇到相同的问题,请确保已检查clientID和clientSecret。 谢谢

答案 1 :(得分:-2)

请检查 clientID && clientSecret 是否有效。