---
title: "Dipta (@Dipta10) | Hashnode"
description: "Fullstack developer. Read the latest articles by Dipta on Hashnode."
url: "https://hashnode.com/@Dipta10"
---

@Dipta10

# Dipta

@Dipta10 · Joined August 2023

Fullstack developer

## Comments

[I think to connect to mongoose we might need to connect this way. mongoose.connect(MONGO\_URI).then(() => { console.log("connected to mongodb"); }).catch((e) => { console.log("could not connect to mongodb", e); }); We would als need to install @types/cookie-session And I think the logout function should be implemented this way router.get("/logout", (req: Request, res: Response) => { req.logout(function(err) { if (err) { console.error('error when logging out', err); } res.redirect("/"); }); });](https://hashnode.com/posts/google-oauth-using-typescript-expressjs-passportjs-and-mongodb/617a7f926584fe6ae5985c6d/comment/6590172e8b01e644a2626b4b)

Comment · Article · Dec 30, 2023 · [Google OAuth using TypeScript, Express.js, Passport.js & MongoDB](https://hashnode.com/posts/google-oauth-using-typescript-expressjs-passportjs-and-mongodb/617a7f926584fe6ae5985c6d)
