Ok, I’ve to admit that now I feel stuck, the tests are passing but I am not getting the result I want… The GitOAuth isn’t working as expecting. Am I missing something?
I can’t get it to work and get the access using github.
I am getting not found and if I try using the same exact code as in the solution it redirect me to a nonexistent GitHub page.
.login.center
a(href='/auth/github') Login with Github!
I tried skipping to later challenges but everything is so confusing, it seems like something is missing in the instructions from that point.
Is it just me? I am going to watch some videos on OAuth using express and passport etc… maybe I can understand why it doesn’t work as expected. I’ve been spoon fed and now I don’t have a clue on how to continue because some instructions are missing.
C’mon it’s only 7 challenges left and I’ll have completed all the 7 challenge certifications (even if I have to admit I have skipped the back-end projects but that doesn’t mean it won’t work at them in the future).
I liked the last certificate section a lot, it’s really interesting.
I haven’t completed the back-end and some front-end projects because I wanted to get an idea of everything. And in all honestly I need to focus on front-end development but I like express and the other back-end technologies a lot compared to when I learned PHP and mySQL.
hello,
I am sorry I will not be able to answr your question but as I am new to this just startted with node I am getting things but I dnt kknow how to use that glitch
In my case after I authorize the user the app doesn’t redirect me to the profile. It throws an error that sais " Cannot read property ‘0’ of undefined". Have you found the solution to this problem?
To anyone who is struggling with this exercise. Try running the code in server.js in the right place (before routes). Exporting seems to mess with checking the requirements. The same thing happened in the previous exercise. Hope that helps.
I also came across this issue when I was completing this challenge. Looking at the console.log for the profile that is returned from GitHub, it seems like if the user has their email set to private, then that array just doesn’t exist. My solution was to add a ternary operation to check if the email array exists before trying to access it. If that array exists, then pull the user’s email address from there. If the email array doesn’t exist then use a default message (like, “No email”)
Within the $setOnInsert object, I set my ‘email’ attribute like this:
Everyone’s code is passing and not working but meanwhile my code is working and not passing. Here’s my glitch. What could be wrong with it to not pass?
Testing and debugging is so weird on this last section. Basically I have to copy/paste the code exactly or my code doesn’t work. That’s how I fixed it. I copy/pasted everything and changed the callback url