Login dengan Google UNTAN (OpenID Connect) yang dihubungkan ke akun aplikasi
- app/google_auth.py: authorization-code flow tanpa dependensi tambahan; klaim id_token diperiksa (iss, aud, exp, nonce, email_verified) dan email wajib domain GOOGLE_DOMAIN (bawaan untan.ac.id + subdomain). Aktif hanya bila GOOGLE_CLIENT_ID & SECRET terisi. - Akun Google ditautkan (pengguna.google_sub) oleh pemilik dari menu Akun, atau otomatis pada login pertama bila email sama dengan email akun / data induk mahasiswa. Tanpa pembuatan akun otomatis; satu Google satu akun; akun nonaktif ditolak. - Putus oleh pemilik mematikan tautan otomatis via email; putus oleh kaprodi (Data Master -> Dosen) mengizinkannya lagi. Login NIP/NPM + password tetap tersedia. - Uji: tests/uji_google.py (tiruan endpoint token Google). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
549fe53a11
commit
b09785fc62
@@ -52,6 +52,12 @@
|
||||
{{ 'Buat Akun Kaprodi & Masuk' if mode == 'setup' else 'Masuk' }}
|
||||
</button>
|
||||
</form>
|
||||
{% if mode == 'login' and google_aktif() %}
|
||||
<div class="divider my-5"><div class="divider-text">atau</div></div>
|
||||
<a class="btn btn-label-secondary d-flex align-items-center justify-content-center gap-2 w-100" href="/auth/google">
|
||||
<i class="icon-base ti tabler-brand-google icon-md"></i>Masuk dengan Google UNTAN</a>
|
||||
<div class="form-text text-center mt-2">Akun Google kampus yang sudah dihubungkan di menu Akun, atau yang emailnya terdaftar di aplikasi.</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center mt-4">
|
||||
|
||||
Reference in New Issue
Block a user