Neden Google Login?
Forum üyelerinizin ayrı şifre oluşturup hatırlaması büyük bir sürtünmedir; kayıt oranını dramatik biçimde düşürür. Google Login (OAuth 2.0 üzerinden) tek tıkla üyelik açar, dönüş ziyaretlerinde otomatik girişe izin verir ve şifre hatırlama problemini ortadan kaldırır. XenForo bu entegrasyonu yerleşik olarak destekler; sadece Google Cloud Console tarafında bir OAuth Client ID oluşturmanız gerekir.Adım 1 — Google Cloud Console'da Proje Oluşturma
https://console.cloud.google.com/ adresine giriş yapın (Google hesabınızla). Üst soldaki proje seçicisinden New Project tıklayın. İsim olarak forum adınızı verebilirsiniz: "AIOR Community OAuth". Organization opsiyoneldir.Adım 2 — OAuth Consent Screen Yapılandırma
Sol menüde APIs & Services → OAuth consent screen'e gidin. User type:- Internal: yalnızca Workspace organizasyonunuzdaki kullanıcılar
- External: tüm Google hesapları (forum kamuya açıksa bunu seçin)
Form alanları:
- App name: "AIOR Community" (kullanıcıya görünür)
- User support email: hi@aior.com
- App logo: 120x120px PNG (opsiyonel ama profesyonel görünüm için tavsiye)
- Authorized domains: aior.com
- Developer contact: hi@aior.com
Scope ekranında .../auth/userinfo.email ve .../auth/userinfo.profile eklenir — XenForo bu kapsamlarla isim ve e-mail bilgisini alır.
Adım 3 — OAuth Credentials Oluşturma
APIs & Services → Credentials'e gidin. Create credentials → OAuth client ID seçin. Application type: Web application.Authorized JavaScript origins:
Code:
https://aior.com
Authorized redirect URIs:
Code:
https://aior.com/community/register/connected/google
Code:
https://aior.com/community/login/connected/google
URL'lerin XenForo'nuzun gerçek path'iyle uyumlu olduğundan emin olun; subfolder'da kuruluysa o subfolder ekleyin.
Create butonuna basın; Google size Client ID ve Client Secret verir. Bunları güvenli bir yere not edin — Client Secret tekrar gösterilmez.
Adım 4 — XenForo Admin'de Yapılandırma
XenForo Admin Panel'e giriş yapın. Setup → Connected accounts'a gidin. Google provider'ını "Enabled" olarak işaretleyin. Açılan alanlara Google Cloud Console'dan kopyaladığınız değerleri girin:- Client ID: xxxxxxxxxxxx-yyyyyyyy.apps.googleusercontent.com
- Client secret: GOCSPX-zzzzzzzzzzzzzz
"Save" butonuna basın.
Adım 5 — Login + Register Sayfalarında Buton
XenForo otomatik olarak login ve register sayfalarına "Sign in with Google" butonu ekler. Style/template tarafında özelleştirme isterseniz Templates → connect_button template'ini düzenleyin; Google ikon rengi, buton boyutu, position ayarları orada.Adım 6 — Test Akışı
İncognito tab'da forum login sayfasına gidin. "Sign in with Google" butonuna tıklayın. Google'ın hesap seçim ekranı açılır. Hesap seçtikten sonra Google "AIOR Community" adlı uygulamaya izin verme ekranı sunar — Allow tıklayın.XenForo geri yönlendirir; ilk girişte forum:
- Hesabı mevcut bir XenForo kullanıcısıyla eşler (e-mail varsa)
- Yoksa yeni hesap oluşturur (kullanıcı adı için son adım)
Yaygın Hatalar
"redirect_uri_mismatch": Google Cloud Console'daki redirect URI'lar XenForo'nun gerçek path'iyle uyuşmuyor. http vs https, trailing slash, alt domain farklarını kontrol edin."This app is blocked": OAuth Consent Screen "Testing" modundaysa yalnızca test user listenizdeki Google hesapları erişebilir. Production için "Publish app" yapın (Google review süreci 1-7 gün sürer).
"Invalid client": Client Secret yanlış kopyalanmış olabilir. Google Cloud Console'dan yenisini üretin.
Üretim İpuçları
Production ortamında OAuth Consent Screen'i mutlaka "Verified" hale getirin; aksi takdirde Google "This app isn't verified" uyarısı gösterir ve kullanıcı güveni düşer. Verification süreci app domain doğrulaması ve privacy policy URL'i gerektirir.AIOR olarak XenForo barındırma müşterilerimize Google + Facebook + Apple OAuth kurulumu ve XenForo addon kurulumu dahil destek sağlıyoruz.
Why Add Google Login?
Asking forum members to invent yet another password is a huge friction point — it drops registration conversion. Google Login (over OAuth 2.0) signs people up in one click, signs them back in automatically on return visits, and removes the "forgot password" problem entirely. XenForo supports the integration out of the box — you only need to create an OAuth Client ID in Google Cloud Console.Step 1 — Create a Google Cloud Project
Sign in at https://console.cloud.google.com/. From the top-left project selector, click New Project. Name it after your forum: "AIOR Community OAuth". Organisation is optional.Step 2 — Configure the OAuth Consent Screen
In the left menu go to APIs & Services → OAuth consent screen. User type:- Internal: only users in your Workspace organisation
- External: any Google account (pick this for a public forum)
Form fields:
- App name: "AIOR Community" (shown to users)
- User support email: hi@aior.com
- App logo: 120x120px PNG (optional but recommended for professional look)
- Authorized domains: aior.com
- Developer contact: hi@aior.com
On the scopes screen, add .../auth/userinfo.email and .../auth/userinfo.profile — XenForo uses these to pull name and email.
Step 3 — Create OAuth Credentials
Go to APIs & Services → Credentials. Click Create credentials → OAuth client ID. Application type: Web application.Authorized JavaScript origins:
Code:
https://aior.com
Authorized redirect URIs:
Code:
https://aior.com/community/register/connected/google
Code:
https://aior.com/community/login/connected/google
Make sure the URLs match your XenForo install path; if you're in a subfolder, include it.
Click Create — Google returns your Client ID and Client Secret. Save them somewhere safe; the secret is not shown again.
Step 4 — Configure XenForo Admin
Sign in to XenForo Admin Panel. Go to Setup → Connected accounts. Toggle Google provider to "Enabled". In the fields that appear, paste the values from Google Cloud Console:- Client ID: xxxxxxxxxxxx-yyyyyyyy.apps.googleusercontent.com
- Client secret: GOCSPX-zzzzzzzzzzzzzz
Click "Save".
Step 5 — Buttons on Login + Register Pages
XenForo automatically adds a "Sign in with Google" button on the login and register pages. If you want to customise via template, edit Templates → connect_button — Google icon colour, button size and positioning live there.Step 6 — Testing the Flow
In an Incognito tab, go to the forum login page. Click "Sign in with Google". Google's account picker opens. After picking an account, Google presents a consent screen for "AIOR Community" — click Allow.XenForo redirects back; on first login the forum either:
- Links to an existing XenForo user (if the email matches)
- Creates a new account (with one final username step)
Common Errors
"redirect_uri_mismatch": the redirect URI in Google Cloud Console doesn't match XenForo's real path. Check http vs https, trailing slash, subdomain."This app is blocked": the OAuth Consent Screen is in "Testing" mode — only Google accounts in your test-user list can sign in. For production, click "Publish app" (Google review takes 1-7 days).
"Invalid client": the Client Secret was copied incorrectly. Regenerate from Google Cloud Console.
Production Tips
For production, always get the OAuth Consent Screen "Verified" — otherwise Google shows a "This app isn't verified" warning and user trust drops. Verification requires domain ownership proof and a privacy policy URL.At AIOR we set up Google + Facebook + Apple OAuth and the XenForo add-ons for our forum hosting customers.
Last edited: