Advanced Node and Express - Implementation of Social Authentication II

I am fairly certain the code should pass for Implementation of Social Authentication II because it passes the following test (Implementation of Social Authentication III), logs the profile successfully to the console and writes successfully to the mongodb database.

Was wondering if anyone had the same issue before and if so did I miss out anything?

1 Like

I remember having an issue with the Email object key, I have it commented out in my project. But that my have been fixed now.

I am also seeing an extra empty parameter in your findOneAndUpdate Double check that.

   <update document or aggregation pipeline>, // Changed in MongoDB 4.2
     projection: <document>,
     sort: <document>,
     maxTimeMS: <number>,
     upsert: <boolean>,
     returnNewDocument: <boolean>,
     collation: <document>,
     arrayFilters: [ <filterdocument1>, ... ]

Thanks. I don’t think the extra parameter was the problem though. Overall I think maybe it is just that particular test case because in the next section where it involves writing to the database the solution works.

I’m having a similar problem and am unable to get the tests to completely pass for my project on any of the 3 “Implementation of Social Authentication” challenges, even though the routes work and the GitHub user gets added to my database. I checked my code against the provided solution and it seems the same.

Actually, @xiandanhuang. I just found this forum post. Maybe this is the issue?

Okay, I finally got mine to pass. Needed to remove some newlines inserted by the Glitch formatting tool. If you’re still having trouble, please check the post I linked above and also this one: