Social Login Setup Guide

Complete step-by-step guide to enable Google and Disqus login for your users

Google OAuth Setup

Enable Google login for your users

1

Create Google Cloud Project

First, you need to create a project in Google Cloud Console:

  1. Go to Google Cloud Console
  2. Click "Select a project" dropdown at the top
  3. Click "New Project"
  4. Enter project name (e.g., "My Webnovel Site")
  5. Click "Create"

Tip: Choose a descriptive project name that you'll remember later.

2

Enable Google+ API

Enable the required APIs for OAuth:

  1. In the left sidebar, click "APIs & Services" > "Library"
  2. Search for "Google+ API"
  3. Click on "Google+ API" and then "Enable"
  4. Also search and enable "People API"
3

Configure OAuth Consent Screen

Set up the consent screen that users will see:

  1. Go to "APIs & Services" > "OAuth consent screen"
  2. Choose "External" user type and click "Create"
  3. Fill in the required fields:
    • App name: Your website name
    • User support email: Your email
    • Developer contact email: Your email
  4. Click "Save and Continue"
  5. Skip "Scopes" section by clicking "Save and Continue"
  6. Skip "Test users" section by clicking "Save and Continue"
4

Create OAuth Credentials

Create the OAuth credentials for your website:

  1. Go to "APIs & Services" > "Credentials"
  2. Click "Create Credentials" > "OAuth client ID"
  3. Choose "Web application" as application type
  4. Enter a name (e.g., "Webnovel Login")
  5. Add Authorized redirect URIs:
    https://e-kitaplar.com/?webnovel_oauth=1&provider=google
  6. Click "Create"

Important: Copy the redirect URI exactly as shown above. Any typo will cause login to fail.

5

Copy Credentials

After creating credentials, you'll see a popup with your Client ID and Client Secret:

Security Warning: Keep your Client Secret private! Never share it publicly or commit it to version control.

Copy both values - you'll need them in the WordPress configuration step.

Disqus OAuth Setup

Enable Disqus login for your users

1

Create Disqus Account

If you don't have a Disqus account yet:

  1. Go to Disqus Signup
  2. Create your account with email and password
  3. Verify your email address
2

Register New Application

Create a new application for OAuth:

  1. Go to Disqus API Applications
  2. Click "Register new application"
  3. Fill in the application details:
    • Label: Your website name
    • Description: Brief description of your site
    • Website: Your website URL
  4. Click "Register my application"
3

Configure OAuth Settings

Configure OAuth settings for your application:

  1. Click on your newly created application
  2. Go to the "Settings" tab
  3. In "OAuth Settings" section, add Callback URL:
    https://e-kitaplar.com/?webnovel_oauth=1&provider=disqus
  4. Click "Save Changes"

Important: The callback URL must match exactly, including the protocol (http/https).

4

Get API Credentials

Copy your API credentials:

  1. In your application page, go to "Details" tab
  2. Copy the "Client ID" (also called API Key)
  3. Copy the "Client Secret"

Security Warning: Keep your Client Secret private! Never expose it in client-side code.

WordPress Configuration

Configure social login in your WordPress admin panel

1

Access Social Login Settings

Navigate to the social login configuration:

  1. Go to your WordPress admin dashboard
  2. Navigate to "Webnovel" > "Social Login Settings"
2

Configure Google Login

Enter your Google OAuth credentials:

  1. Check "Enable Google Login"
  2. Paste your Google Client ID
  3. Paste your Google Client Secret
  4. Click "Test Google Connection" to verify
3

Configure Disqus Login

Enter your Disqus OAuth credentials:

  1. Check "Enable Disqus Login"
  2. Paste your Disqus Client ID
  3. Paste your Disqus Client Secret
  4. Click "Test Disqus Connection" to verify
4

Save Settings

Finalize your configuration:

  1. Review all your settings
  2. Click "Save Settings"
  3. You should see a success message

Testing & Troubleshooting

Test your setup and fix common issues

Testing Your Setup

  1. Open an incognito/private browser window
  2. Go to your login page: https://e-kitaplar.com/login/
  3. You should see Google and Disqus login buttons
  4. Click on each button to test the OAuth flow
  5. Complete the login process with your test accounts
  6. Verify that you are redirected back and logged in

Common Issues & Solutions

Error: "redirect_uri_mismatch"

This means the redirect URI in your OAuth app doesn't match the one being sent.

  • Double-check the redirect URI in Google/Disqus settings
  • Ensure it matches exactly (including http/https)
  • Check for trailing slashes or extra characters

Error: "invalid_client"

This usually means your Client ID or Client Secret is incorrect.

  • Verify you copied the credentials correctly
  • Check for extra spaces or missing characters
  • Regenerate credentials if necessary

Social login buttons not showing

The buttons might not be enabled or configured properly.

  • Check that you enabled the login methods in settings
  • Verify credentials are saved correctly
  • Clear any caching plugins

Users can't access email scope

Some OAuth providers require additional verification for email access.

  • For Google: Ensure your OAuth consent screen is configured
  • For Disqus: Check that email scope is requested
  • Some providers may require app verification for production use

Debug Tools

Use these tools to diagnose issues:

Browser Developer Tools

  • • Check Console for JavaScript errors
  • • Monitor Network tab for failed requests
  • • Look for 4xx/5xx HTTP status codes

WordPress Debug Log

  • • Enable WP_DEBUG in wp-config.php
  • • Check /wp-content/debug.log
  • • Look for OAuth-related errors

Congratulations!

You've successfully set up social login for your webnovel platform. Your users can now sign in with Google and Disqus!