Skip to content
/ OAuth20 Public template

A boilerplate nodejs setup for signup with a google account using OAuth20

Notifications You must be signed in to change notification settings

ilan7empest/OAuth20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps for google signup using OAuth20

1. Clone repository

2. Create .env file in root folder with the following key=value

PORT: localhost port,
MONGO_URI: "Connection string to Mongodb",
GOOGLE_CLIENT_SECRET: secret text/characters,
GOOGLE_CLIENT_ID:  Google Client Id. Create credentials "https://console.developers.google.com/,
GOOGLE_REDIRECT_URI: domain url for the redirect path after signup (example: "http://localhost:1234"),
COOKIE_SESSION_SECRET: secret text/characters,

3. Signup path = "domain/auth/google" = GET Request

4. After signup google redirects to "/" if successful or "/login" if failed

5. Use is-auth middleware to check authenticated user

About

A boilerplate nodejs setup for signup with a google account using OAuth20

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published