Google

To enable Auth.it to authenticate users with Google:

  1. In Auth.it’s Authentication view:
    1. In the Google section, click Enable Google.
    2. In the configuration pop-up, click the toggle to enable Google integration.
    3. Copy the redirect URI that Auth.it displays.
  2. In Google Cloud Console, create OAuth credentials:
    1. Go to Google Cloud Console.
    2. Select an existing project or create a new one for your application.
    3. Click the menu button in the top-left corner to open the navigation menu, then go to APIs & Services → Credentials.
    4. Click Create Credentials → OAuth client ID.
    5. If prompted about the consent screen, click Configure consent screen, then:
      1. Click Get started.
      2. Enter an application name, then click Next.
      3. Set Audience to External, and click Next.
      4. Enter your contact email, then click Next.
      5. Agree to the user data policy, click Continue, then click Create.
    6. After being redirected to the OAuth Overview view, click Create OAuth client:
      1. For Application type, select Web application.
      2. Enter an internal name for the OAuth client (this will not be shown to users).
      3. In Authorized JavaScript origins, add your application’s root URL. This can be a localhost URL for testing purposes or the public URL of your application.
      4. In Authorized redirect URIs, paste the redirect URI you copied from Auth.it.
      5. Click Create.
    7. Copy the generated Client ID and Client secret.
  3. Back in Auth.it’s Google configuration pop-up:
    1. Paste the Google client ID into Google Client ID.
    2. Paste the Google client secret into Google Client Secret.
    3. Click Save changes.

To test that the Google integration is working:

  1. In your application, go to the login page. Notice that it now contains a button to log in with Google: Login page with a Google login button
  2. Click the Google login button.
  3. If your Google login session is active, you should see the Google consent screen requesting access on behalf of your OAuth application. Click Continue: Authorize Google OAuth app
  4. You are now logged in with Google and redirected back to your application.