Google authorization settings

This feature allows your customers (users) to sign in to the site or register using their Google account in one click, without the need to fill out forms with email, password or other data. This simplifies the process and increases conversion, but is optional: you can keep the standard sign-in/registration method unchanged.

To enable Google sign-in in Lara-Script, you need to configure the settings in Google Cloud Console.

1. Create an OAuth 2.0 Client ID

  1. Sign in to the Google Cloud Console.

  2. Select your project or create a new one.

  3. Go to APIs & Services → Credentials → Create Credentials → OAuth client ID.

  4. Specify the application type: Web application.


2. Fill in the fields for your domain

In the Client ID registration form you need to add your site in two fields:

  • Authorized JavaScript origins – here you specify the main site address (for example):

    https://demo.lara-script.com
  • Authorized redirect URIs – this is the same address but with the added path /api/auth/callback/google:

    https://demo.lara-script.com/api/auth/callback/google

3. Obtain the Client ID and Client Secret

After saving you will receive two values:

  • Client ID

  • Client Secret

They need to be inserted into the corresponding fields in the Lara-Script admin panel (but entering the Redirect URL in the admin is not required — it is used only in the Google Cloud Console).


4. Check the functionality

After activation, a button will appear on the sign-in form “Sign in with Google”. The customer clicks → is authorized in Google → an account in Lara-Script is automatically created/linked.


⚡ Important: the addresses in the Google Cloud Console must exactly match the domain of your site, otherwise Google will not allow authorization.

Last updated