Does not pass the test (Quality Assurance Course, Advanced Node and Express, Implementation of Social Authentication III)

Error :

You need to complete the configuration of your GitHub strategy.

Situation :

  • It is possible to manually log in using the Github strategy.
  • However, it does not pass the FCC test no matter how many times I try.
  • I have made some of my own changes from the code in the answer here , but I don’t think they are function-destroying changes.

Tried :

  • Searching the FCC forums
    The FCC forum has a lot of articles from the past before the move to Replit, none of which were helpful.
  • Check the answer code again.
  • Changing the homepage URL
    The “Implementing Social Authentication I” challenge had instructions to set Replit’s home page as the root URL, but that one didn’t work well when we tried it manually, so we changed [the demo URL](https:// boilerplate-advancednode.so-san.repl.co) as the root URL.

Reference :

If there is no valid solution, here is an article, I would like to test it in a local environment.

Thank you for your cooperation.

Hello there,

The test is failing because of this line:

			{ upsert: true, new: true },
			(err, doc) => cb(null, doc.value)
		);

You should have:

        { upsert: true, new: true },
        (err, doc) => {
          return cb(null, doc.value);
        }

It is a bug in the test.

Hope this helps

1 Like

@sky020
With your help I was able to pass the test. Thank you very much!

I just don’t understand why this change makes the test pass.
I thought the Arrow function could be rewritten as follows, and I thought they were equivalent.

// patern 1
(a) => { return a }

// patern 2
(a) => a

There is nothing wrong with your code. The issue is the test is written as a Regex test, and only looks for /return a/.

We have been working on improving the tooling and tests, but none of it has made its way to this side of the curriculum yet.

I have opened a quick fix for this: fix(curriculum): soften regex test ad-node by ShaunSHamilton · Pull Request #49240 · freeCodeCamp/freeCodeCamp · GitHub

1 Like

Now I understand why it didn’t pass the test. Thank you very much.
Thank you also for your daily improvement work.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.