DekEn

อัปเดต 2026-09-07

Google / Facebook OAuth

OAuth 2.0 one-click sign-in

Sign in with Google or Facebook via OAuth 2.0 in addition to email + password, wired through Authlib's OAuth registry on the backend, so onboarding is one click instead of a form.

เมื่อไรจึงใช้
  • You want to cut sign-up friction for a new visitor
  • You're debugging an 'account already exists' OAuth error
  • You're checking whether OAuth is configured for a given local/dev environment
คำนวณอย่างไร

Each provider is registered with Authlib (_oauth.register(...)) and exchanged for a DekEn session JWT after the provider's own callback verifies identity — the same downstream session model as email/password.

ข้อควรระวัง
noteOAuth is OFF in local dev by default (no client credentials configured) — email/password is the only working local login path unless real Google/Facebook app credentials have been added.
noteIf someone already registered locally with the same email as their Google/Facebook account, OAuth sign-in fails by design (prevents an attacker pre-registering a victim's email) and a friendly error page suggests the correct login method instead.
ที่เกี่ยวข้อง