Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Radithya90/new

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website Kelas Kami - Google OAuth Integration

Website sederhana untuk komunitas kelas dengan fitur login dan registrasi menggunakan Google OAuth.

Fitur

  • Registrasi akun manual dengan validasi password
  • Login dengan username dan password
  • Integrasi Google OAuth untuk registrasi dan login
  • Deteksi akun Google otomatis saat registrasi
  • Login dengan Google untuk akun yang sudah terdaftar

Setup Google OAuth

Untuk menggunakan fitur Google OAuth, Anda perlu mengatur Google OAuth client ID:

  1. Kunjungi Google Cloud Console
  2. Buat project baru atau pilih project yang ada
  3. Aktifkan Google+ API
  4. Buat OAuth 2.0 Client ID:
    • Pilih "Web application"
    • Tambahkan authorized origins: http://localhost:8000 (atau domain Anda)
    • Tambahkan authorized redirect URIs: http://localhost:8000 (atau domain Anda)
  5. Copy Client ID yang dihasilkan

Mengatur Client ID

Edit file register.html dan login.html, ganti 'YOUR_GOOGLE_CLIENT_ID_HERE' dengan Client ID Anda:

client_id: '123456789-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com'

Cara Menjalankan

  1. Buka file index.html di browser
  2. Atau gunakan server lokal:
    python -m http.server 8000
    Kemudian buka http://localhost:8000

Catatan

  • Data pengguna disimpan di localStorage browser (hanya untuk demo)
  • Dalam aplikasi nyata, gunakan database dan server backend
  • Password tidak di-hash (hanya untuk demo)
  • Pastikan untuk mengganti placeholder Client ID dengan yang sebenarnya

Teknologi

  • HTML5
  • CSS3
  • JavaScript (ES6+)
  • Google Sign-In API

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published