Open nkoval opened 4 years ago
@nkoval I have very limited node.js knowledge but I managed to fix it.
What you need to do is to update your passportjs
and import the new version in your auth.js
file:
npm install passport-google-oauth20@2 --save
Chapter06/chapter6-full/server/src/auth.js
replace this:
import { OAuth2Strategy as GoogleStrategy } from 'passport-google-oauth'
with this:
var GoogleStrategy = require('passport-google-oauth20');
your auth.js file should look like this now:
import passport from 'passport'
//import { OAuth2Strategy as GoogleStrategy } from 'passport-google-oauth'
var GoogleStrategy = require('passport-google-oauth20');
import * as Users from './connectors/users'
import { GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, PUBLIC_URL } from './config'
passport.use(new GoogleStrategy(
...
source: https://medium.com/passportjs/google-api-shutdown-330c3b47e3df
Error: read ECONNRESET
at Strategy.OAuth2Strategy._createOAuthError (F:\workspace\server\node_modules\passport-oauth2\lib\strategy.js:408:17)
at F:\workspace\server\node_modules\passport-oauth2\lib\strategy.js:175:45
at F:\workspace\server\node_modules\oauth\lib\oauth2.js:193:7
at ClientRequest.
I have encountered the above problems. How can I solve them
Error: read ECONNRESET at Strategy.OAuth2Strategy._createOAuthError (F:\workspace\server\node_modules\passport-oauth2\lib\strategy.js:408:17) at F:\workspace\server\node_modules\passport-oauth2\lib\strategy.js:175:45 at F:\workspace\server\node_modules\oauth\lib\oauth2.js:193:7 at ClientRequest. (F:\workspace\server\node_modules\oauth\lib\oauth2.js:162:5) at ClientRequest.emit (events.js:315:20) at ClientRequest.EventEmitter.emit (domain.js:486:12) at TLSSocket.socketErrorListener (_http_client.js:469:9) at TLSSocket.emit (events.js:315:20) at TLSSocket.EventEmitter.emit (domain.js:486:12) at emitErrorNT (internal/streams/destroy.js:106:8)
I have encountered the above problems. How can I solve them
I meet this problem too, have you solved it ?
When I try to login using google, I am getting the following response
It seems that Google+ API has been shot down