Hey, I have been trying to build an authentication system where I have taken more fields other than, the username and password. I wish to register a user and then, redirect him to a page but what happens is that after successful registration, the page is shown in the network tab of the developer’s console but not on the browser screen.I am using EJS, nodejs, mongo and express and passport

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi there,

Do you see any errors in the console as well? Also is the web application that you are building open source? If this is the case can you share a link to the source code here?

Additionally, here is a good tutorial which I could suggest starting with:

https://www.digitalocean.com/community/tutorials/api-authentication-with-json-web-tokensjwt-and-passport

Regards,
Bobby

by Obielum Godson
Many web applications and APIs use a form of authentication to protect resources and restrict their access only to verified users. This guide will walk you through how to implement authentication for an API using Json Web Tokens (JWTs) and Passport, an authentication middleware for Node.