Docs / Passwordless & social login

Login with Google

Create a Google OAuth client and connect it to FluentAuth, step by step.

All documentation

Google sign-in needs an OAuth client in a Google Cloud project. It is free and takes about ten minutes the first time.

1. Create the OAuth client

  1. Open the Google Cloud console credentials page. Create a project if you do not have one.

  2. If prompted, configure the OAuth consent screen first: choose External, give the app your site’s name, a support email and your privacy policy URL. Scopes: email and profile are all FluentAuth asks for.

  3. Click Create credentials → OAuth client ID.

  4. Application type: Web application.

  5. Under Authorized redirect URIs, add your login page:

    https://example.com/wp-login.php

    Use https and the exact host your site uses (with or without www), or Google will refuse the callback.

  6. Click Create and copy the Client ID and Client secret.

2. Connect it to FluentAuth

Either paste the two values under FluentAuth → Settings → Social Login → Google, or add them to wp-config.php:

define('FLUENT_AUTH_GOOGLE_CLIENT_ID', '1234567890-abc.apps.googleusercontent.com');
define('FLUENT_AUTH_GOOGLE_CLIENT_SECRET', 'GOCSPX-…');

Turn on Enable login with Google and save.

3. Test it

Open your login page in a private window. A Continue with Google button should be there. Sign in with a Google account whose email matches an existing user, or, if registration is open, with any account to create one.

While the consent screen is in Testing, only the Google accounts you list as test users can sign in, and Google shows a warning. Click Publish app on the consent screen page to open it to everyone. For the email and profile scopes Google does not require a review.

Common errors

Google saysCause
redirect_uri_mismatchThe redirect URI in the console does not exactly match the login URL, usually http vs https or www
access_blocked: This app's request is invalidConsent screen not configured, or still in testing and the account is not a test user
invalid_clientClient ID or secret pasted with a stray space, or the wp-config constant is misspelled

To make that button a one-click, personalised one, see Google One-Tap.