Hi…
I have tried this challenge in several times . All passed the test but none works as it supposed to be
- Why doesn’t log my GitHub profile to my console in localhost ,even it directs to ‘
/profile
’ (in replit it does log the profile) - When it directs to the ‘
/profile
’ id, name, photo, etc do not appear.
the error message:
(node:210) DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead.
(Usenode --trace-deprecation ...
to show where the warning was created)
when I change to ‘findOneAndUpdate’
I get error:
TypeError: Update document requires atomic operators
at new FindOneAndUpdateOperation (/home/runner/boilerplate-advancednode-1/node_modules/mongodb/lib/operations/find_one_and_update.js:30:13)
at Collection. (/home/runner/boilerplate-advancednode-1/node_modules/mongodb/lib/collection.js:1804:7)
at Collection.deprecated [as findOneAndUpdate] (/home/runner/boilerplate-advancednode-1/node_modules/mongodb/lib/utils.js:611:15)
at Strategy._verify (/home/runner/boilerplate-advancednode-1/auth.js:43:16)
at /home/runner/boilerplate-advancednode-1/node_modules/passport-oauth2/lib/strategy.js:205:24
at /home/runner/boilerplate-advancednode-1/node_modules/passport-github/lib/strategy.js:174:7
at passBackControl (/home/runner/boilerplate-advancednode-1/node_modules/oauth/lib/oauth2.js:134:9)
at IncomingMessage. (/home/runner/boilerplate-advancednode-1/node_modules/oauth/lib/oauth2.js:157:7)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
another silly question : Is the request for authentication asked only at the first time I click “Login with GitHub!” ? After that it directly direct to ‘/profile
’
Link to boilerplate:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0
Challenge: Advanced Node and Express - Implementation of Social Authentication
Link to the challenge: