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

Rup*_*esh 4 express passport.js

当我尝试使用google oauth20时出现此错误 TokenError:未经授权在Strategy.OAuth2Strategy._createOAuthError(C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ passport-oauth2 \ lib \ strategy.js:329:12)在Strategy.OAuth2Strategy.parseErrorResponse(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 at passBackControl(C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ oauth \ lib \ oauth2.js:132:9)。(C:\ Users \ Rupesh \ Desktop \ Projects \ storybook1 \ node_modules \ oauth \ lib \ oauth2.js:157:7)位于EndReadableNT(_stream_visible.js:1081)的IncomingMessage.emit(events.js:187:15): 12)进行中。

please help

Rup*_*esh 6

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