I don’t have any problems getting the console log for the connected user. My only issue was with the “error” messages when I ran the test-suite.
As suggested by others here, adding the following in server.js (placed at the top along with the other dependency requirements) solved the test-suite problems for me:
const cors = require("cors");
app.use(cors());
Alternatively, app.use(cors()) can be added to the fccTesting.js file, where const cors = require('cors') is already present. It seems the author simply forgot to the the app to use CORS.
Thank you for your answer! I forgot again about the “cors” instantiation again in this challenge and didn’t pass for me either. Solved it after requiring and instantiation. Some past challenges had this problem also and I solved them after adding “cors” but with so many things to look out for I got stuck on this one because of this.
I’ll put in on a sticky note on my monitor as a reminder and all of you should do so
Hi stevenYouhana
pretty sure at this point it is your callback URL callbackURL: "https://buttercup-delete.gomix.me/auth/github/callback"
which you need to change and enter the URL of your project instead, callbackURL: "https://user-auth-ex.glitch.me//auth/github/callback"
also can you check if your client id and clientsecret are present in the .env file along with the session_secret, I think that should fix it
I’m at the last test of Advanced Node and Express my code is working but still fcc is generating an error on the send and display chat messages challenge: see my code at glitch:
Another peculiarity I found out and which may be useful, is that the same code may ot may not pass the tests if formatted with the glitch “Format this file”…
You are a lifesaver, thanks for pointing this out. I would never have thought to look for that in fcctesting.js and this has made everything work for me.