Node js authentication application. This app is a custom build node js authentication applications.
#Features of this application are :
-
Google oauth login / sign up feature
-
Password is stored in bcrypt encryption
-
Reset feature for password from 2 ways. One for logined user and one for user who is not login via email
4.Displays alerts for user when they sign in logout
- google recaptcha v2 is enabled for login sign up page.
#How to install this application
-
Use npm install or yarn command to install all dependencies.
-
Make a .env file. You will be needing different parameters to be stored there
-
For sending emails using gmail you will need any email id whose password you have EMAIL = 'email address @ gmail.com' PASSWORD = '****'
Please note that this password you will need to enabled 2FA in your gmail account and then make a app which will provide you password for it. Don't store the password in other pages. use .env file for it.
-
For google authentication to work you will need to googleClientSecret=***** googleClientId=*******
this will store your client secret go to google console and you will be getting new credentials there. that will alos provide you the Client Id
googleOAuthRedirect= http://localhost:3000/sessions/oauth/google
googleOAuthPublicEndPoint= http://localhost:3000
Don't change this 2 above urls. Only change when you are putting your server on production. Also note that google oauth will work for SSL secrured sites only. Replace only http: part till 3000.
-
For enabling google recaptcha go to google recaptcha site and click google admin.
-
Select your version and select invisible google recaptcha which this projecgt is using . you will get the key from there.
-
replace that key with your key in signin.ejs and home.ejs pages in data-sitekey in button pages.
You are good to go once all this steps done.