I am new to NodeJs and what to create a login page by Node JS and afterwards I want to authentication for login with the same.
Kindly let me know what all I should know to do a basic nodejs login page and how should I proceed?
Thanks
this example made using express which is small framework for node.js
Easy Node Authentication
Related
I am working on my first full stack application and making a facebook clone till now i made a login and registration system and connected it to express and mongodb as my database, the front end for my login system is written in HTML and CSS only after this i started to work on the main page of facebook in react and made a similar ui in react now the problem is I don't have any idea of how to route it with my express where all the other routes are i mean like i have a login root , a forgot password root and so on i don't know how to show the Facebook front page when someone logs in . So please help me with this.
So you want to send the login/registration data to the backend? You can use axios (https://github.com/axios/axios). When making an API call, React will try first try and look it up in the frontend, if it cannot find anything it will pass it on. To enable the pass on you have to add this to you package.json.
"proxy": "http://localhost:5000",
Of course the 5000 is your port where the express backend is running.
I have following problem:
I have an App with React Native and I need authentication via Facebook.
I figured out how to do it with expo and the expo-facebook but my problem is, that I also need authentication in the backend, which is done with NodeJs.
What is the right approach to do it, when the backend also needs to be secure?
I looked thru the internet for ours and didnĀ“t find any tutorial...
Thanks in advance!
Check Passportjs. It's an authentication middleware for Nodejs. Search for the relevant strategy. Should be fairly easy to implement.
This is not really a question but more a request for a recommendation. So, I learned some front end (html, css and vanilla js) and some back end (nodejs + express) but now I would like to develop my own web app as I think i'll learn a lot while im doing it. My biggest question is on backend, im planning to use nodejs + express and a database (preferencially mysql) connected to it, as I told before i've already learned some back end but i only wrote a server file, I would like to know how this web app should be organized and how to connect the backend to a database. For example, developing a page where users can create and login with their own accounts and have their own data. Could you please give me some good resource where I could build something similar so I would learn it? Thanks a lot!
I used this tutorial and some other in the same website to make a webapp with nodeJS express.js and MySQL so here's the link, have fun !
https://codeforgeek.com/2015/01/nodejs-mysql-tutorial/
I am trying to build an application in nodejs and angular 6, where the login is done with node and after successful authentication the user is redirected to an angular application. I have looked at many resources online but only seem to find examples of either angular apps with login screens (that call nodejs API endpoints to pass user credentials), or with nodejs using express and Passport. If anyone can point me in the right direction for an example of this I would be extremely greatful.
I had created a repo similar with what you're looking for.
Here's the link to the project: ngx-express-passport-setup
You can clone it & try testing it on your environment. Setup instruction is provided.
Provided with all the instructions on ReadMe.Md for someone who wants to use Passport via local, google+, facebook and twitter Step by Step.
This project uses Angular5, NodeJS and ExpressJS
Hope this will help/guide you with your problem if ever you'll decide on using PassportJS as your Authentication as it is quite actually a popular tool for NodeJS.
I have a login page that accesses node.js which in turn shud access another server to provide authentication to my login page!how to i achieve dat? pls do help i am entirely new to node.js
You can use http.request
http://nodejs.org/api/http.html#http_http_request_options_callback