Hi all,
for those working with glitch template, you need to add the following to your server.js
const cors=require('cors');
app.use(cors());
in order for your tests to pass.
And in the introduction of section " Authentication Strategies", the LocalStrategy should be const LocalStrategy = require('passport-local').Strategy;
instead of const LocalStrategy = require('passport-local');
Hi,
I have other problem with Strategies challenge - redirecting to the homepge is not accepted for some reason. Test shows an error, despite proper code.
Hi,
I also have problem with that challenge.
The test fails on the second requirement. But I can see that page is redirected after POST request to /login.
Yeah, that’s how I found out. I checked the source code on GitHub to see what exactly the test was checking for to pass, since I had the same problem. I couldn’t understand why I couldn’t pass the test, even though my code worked perfectly. When I checked the test’s implementation, I saw that it used the regex /Home page/gi to find any variation of “Home page” on the page, so I changed my title to “Home page” and it worked. What I don’t like is that nowhere in the lessons did it say to add that phrase to the page to pass. I assume the test wasn’t meant to be set up that way. Oh, well. At least we passed it.
There are more bugs in the testing environment. I have passed some test just putting ‘correct’ code in the comments. For example ive noticed there is a typo in test for socket.io challenge: instead of checking passport.socketio it checks for passportsocketio
There is somewhere also a typo - i found passportsockerio.
Not sure, but if remember well also it looks for '\/auth\/github' insted of '/auth/github'.