DEV Community

Google Login in Express with PassportJS & JWT (opens in new tab)

In this blog, we will implement Google Authentication in an Express.js app using: TypeScript Express.js Mongoose Passport.js JWT Authentication Project Structure └── src/ ├── config/ ├── controllers/ ├── middlewares/ ├── models/ ├── routes/ ├── utils/ ├── app.ts └── index.ts ├── .env ├── package.json └── tsconfig.json Install Required Packages npm install passport passport-google-oauth20 npm install jsonwebtoken cookie-parser bcrypt mongoose npm install -D @types/passport-google-oauth20 Creat...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help