To activate Google login with OAuth2, you must access the VTEX ID in your admin and fill in the Client ID
and Client Secret
fields, as described in this article.

These values are derived from a project that needs to be created in the Google Cloud Platform API service.
To get these values, do the following:
The steps mentioned below describe a third-party platform and may therefore be outdated. For the latest information related to these steps, please access the following Google articles: Setting up OAuth 2.0 and OpenID Connect.
-
Access the link
https://console.developers.google.com/
; -
In the side tab, click on Credentials;
-
Click on Create Project;
-
Name the project and click on Create;
-
Click on Create credentials;
-
Select the OAuth client ID option;
-
Click on Configure consent screen;
-
Choose the type of user for your store(Internal or External) and click on Create;
-
Application name: will be shown to clients when logging in;
-
User support email: for users to contact you with question about their consent;
-
App logo: corresponds to your store logo;
-
Authorized Domains: domains that may interact with this API should be included. These should be, at least, the domain of your store and the VTEX domain:
store.com
, as the example, always without "www" or its equivalentvtex.com.br
, regarding our backend servers
-
Developer contact information: these email addresses are for Google to notify you about any changes to your project;
-
Click on Save and continue;
-
In the left side menu, click on Credentials;
-
In Type of application, click on Web Application;
-
Name: for internal identification;
-
Authorized JavaScript origins: add the exact addresses that can use this authentication method, corresponding to your site; for example
https://www.mystore.com
. We also recommended that you add the addresshttps://{{accountName}}}.myvtex.com
of your account, where{{accountName}}
is your account name as described in the store's admin menu; -
Authorized redirect URIs: add the VTEX service URL: -
https://vtexid.vtex.com.br/VtexIdAuthSiteKnockout/ReceiveAuthorizationCode.ashx
-
After you complete these steps, your credentials will be displayed:
- Copy the Client ID from Google and paste it into the `Client Id' field in the VTEX ID admin.
- Copy the client secret key from Google and paste it into the
Client Secret
field in the VTEX ID admin.
Then, save the changes.