Social Logins > Google App Setup

This document provides instructions on properly setting up Google OAuth so users can log in/register via Google on your site.

Please note that the Google social login feature requires the WP ULike Pro version.

Step 1: Configure Consent Screen

  1. Go to the Google Cloud Console:
  2. Click on "Select a project" at the top and create a new project or select an existing one.
  3. In the left sidebar, navigate to "APIs & Services" > "Credentials."
  4. Click "Configure consent screen."
  5. Choose "External" user type,
  6. Fill in the necessary details, including the app's name and authorized domains.
  7. Under "Scopes for Google APIs," you can choose the necessary scopes based on your requirements.
  8. Add your support email and developer contact information.
  9. Save your consent screen configuration.

Step 2: Create a Google OAuth Application

  1. From the "Credentials" page, click the "Create credentials" dropdown and select "OAuth client ID."
  2. Choose "Web application" as the application type.
  3. Fill in the following details:
    • Name: Give your application a name.
    • Authorized JavaScript origins: Enter the URL of your WordPress site.
    • Authorized redirect URIs: Enter the callback URL provided by WP ULike: (You can find this URL in "Step 3" settings)
  4. Click "Create" to generate the client ID and client secret.
  5. Keep the "Client ID" and "Client Secret" handy for the next steps. If no Client Secret is shown, you need to click the "Create credentials" dropdown and select "OAuth client ID" again, then choose "Web application" as the application type, and you'll be able to generate the client secret.

Step 3: Configure WP ULike Social Login

  1. In your WordPress admin dashboard, navigate to "ULike ᴾᴿᴼ" > "Configuration" > "Social Logins."
  2. Enable the "Social Logins" option.
  3. Add a new social network and choose "Google" for the network option.
  4. Enter the "Client ID" and "Client Secret" from the Google OAuth application you created earlier.
  5. Choose your styling configurations and set an option for "Auto Display."
  6. You can also create a new profile tab and add the [wp_ulike_pro_social_login] shortcode to allow existing users to connect their Google accounts.
  7. Save your settings.

Step 4: Test the Google Social Login

  1. On your WordPress site, go to your login page (or profile page if you added the shortcode).
  2. Click on the "Google" login option.
  3. You'll be redirected to Google's login page. Log in with your Google account credentials.
  4. After successful authentication, you'll be redirected back to your profile with a success message.

Step 5: Verify Functionality

  1. After logging in with Google, ensure that your user profile is updated with the appropriate Google information.
  2. Test the social login multiple times to ensure consistent functionality.

Congratulations! You've successfully set up Google social login for the WP ULike Pro plugin.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us