https://github.com/panntod/oauth-nodejs
This repository is a digital chronicle of my adventures in mastering Google's OAuth 2.0 with the elegance of Node Jsð
https://github.com/panntod/oauth-nodejs
ejs express-js google mongodb mongosee node-js oauth2 vercel
Last synced: 10 months ago
JSON representation
This repository is a digital chronicle of my adventures in mastering Google's OAuth 2.0 with the elegance of Node Jsð
- Host: GitHub
- URL: https://github.com/panntod/oauth-nodejs
- Owner: panntod
- Created: 2023-10-31T07:52:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-10T23:43:44.000Z (over 2 years ago)
- Last Synced: 2025-08-03T22:46:53.750Z (11 months ago)
- Topics: ejs, express-js, google, mongodb, mongosee, node-js, oauth2, vercel
- Language: JavaScript
- Homepage: https://todolist-node-js.vercel.app/
- Size: 32.2 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OAuth Google 2.0 ð
## Deskripsi
Dalam repo ini, mengimplementasikan OAuth atau autentikasi menggunakan layanan dari Google (versi 2.0). Setelah berhasil login, akan menampilkan sebuah web todolist sederhana yang menyimpan data menggunakan MongoDB dan menggunakan Materialize untuk membuat tampilan website lebih menarik.
## Fitur
- Sistem CRUD âš
- Akses MongoDB ð
- Rest API ð
- OAuth Google (v2.0) ð
## Cara Membuat Aplikasi
### Langkah 1:
Pastikan sudah membuat OAuth Google Project atau buat menggunakan link ini:
[Google Cloud Console](https://console.cloud.google.com/projectselector2/apis/credentials/consent?supportedpurview=project).
### Langkah 2:
setelah itu masukan token api yang telah didapatkan ke dalam `.env`
```env
{
PORT=3000
MONGO_URI=
GOOGLE_CLIENT_ID=.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=
},
```
### Langkah 3:
dan digunakan untuk memproses `passport.js` untuk menyimpan data yang akan dikirim ke Google
```js
{
clientID: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
callbackURL: "/auth/google/callback",
},
```
### Langkah 4:
Jalan kan perintah ini untuk mendapatkan package:
```
npm install
```