Google Authentication Guide

Google Authentication is the most widely used OAuth 2.0 provider on the Preads Platform. Integrating Google Login allows for seamless, verified access to your network while leveraging Google's enterprise-grade security.


🛠️ Developer Console Setup

Follow these steps to generate the required credentials for your platform.

1. Create a Google Cloud Project

  1. Navigate to the Google Cloud Console.
  2. Click Select a project (top bar) and select New Project.
  3. Name your project (e.g., Preads-Offerwall) and click Create.
  1. Go to APIs & ServicesOAuth consent screen.
  2. Select External as user type and click Create.
  3. Fill in the App Information:
    • App name: Your Website/Network Name.
    • User support email: Your admin email.
    • Developer contact info: Your admin email.
  4. Click Save and Continue until you return to the dashboard.

3. Generate API Credentials

  1. Go to APIs & ServicesCredentials.
  2. Click + CREATE CREDENTIALS and select OAuth client ID.
  3. Application type: Web application.
  4. Authorized Redirect URIs: Add your callback URL.
    • Format: https://your-domain.com/auth/social/google/callback
  5. Click Create.
  6. Copy and Save: Your Client ID and Client Secret.

⚙️ Platform Integration

Navigate to Admin Panel → Settings → Login Settings → Social Login.

  1. Google Client ID: Paste your Client ID.
  2. Google Client Secret: Paste your Client Secret.
  3. Google Enabled: Toggle to ON.
  4. Save Settings: Ensure you click the save button at the bottom of the page.

🔍 Technical Details

Endpoint Mapping

The platform maps the following Google attributes into the Publisher model:

  • sub (ID) → Unique social identity tracking.
  • email → Used for primary account identification.
  • name → Mapped to the Publisher's profile name.
  • email_verified → Used to automatically activate the account.

Debugging & Callbacks

  • Redirect Mismatch: If you see a redirect_uri_mismatch error, ensure the URL in the Google Console exactly matches the one configured in your .env or computed via route('social.callback', 'google').
  • HTTPS Requirement: Google requires an SSL-secured (https) callback URL for all production integrations.

Configure Facebook Authentication →