{"section":"tutorials","requestedLocale":"en","requestedSlug":"adding-a-client-id-and-a-client-secret-to-log-in-with-google","locale":"en","slug":"adding-a-client-id-and-a-client-secret-to-log-in-with-google","path":"docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google.md","branch":"main","content":"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](/en/tutorial/configuring-user-id-with-facebook-and-google).\n\n![Google OAuth](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_1.png)\n\nThese values are derived from a project that needs to be created in the Google Cloud Platform API service.\n\nTo get these values, do the following:\n\n> ⚠️ 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](https://support.google.com/cloud/answer/6158849) and [OpenID Connect](https://developers.google.com/identity/protocols/oauth2/openid-connect).\n\n1. Access the link [`https://console.developers.google.com/`](https://console.developers.google.com/);\n2. In the side tab, click on **Credentials**;\n3. Click on **Create Project**;\n   ![Criar Projeto Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_2.png)\n4. Name the project and click on **Create**;\n   ![Novo Projeto Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_3.png)\n5. Click on **Create credentials**;\n   ![Criar Credenciais Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_4.png)\n6. Select the **OAuth client ID** option;\n   ![ID cliente OAuth Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_5.png)\n7. Click on **Configure consent screen**;\n   ![Configurar Tela Consentimento Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_6.png)\n8. Choose the type of user for your store(**Internal** or **External**) and click on **Create**;\n   ![Tipo usuário Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_7.png)\n9. **Application name**: will be shown to clients when logging in;\n10. **User support email**: for users to contact you with question about their consent;\n11. **App logo**: corresponds to your store logo;\n12. **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:\n    - `store.com`, as the example, always without \"www\" or its equivalent\n    - `vtex.com.br`, regarding our backend servers\n13. **Developer contact information**: these email addresses are for Google to notify you about any changes to your project;\n14. Click on **Save and continue**;\n    ![Configurações Tela Consentimento EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_8.png)\n15. In the left side menu, click on **Credentials**;\n16. In Type of application, click on **Web Application**;\n    ![Credenciais Aplicativo Web Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_9.png)\n17. **Name**: for internal identification;\n18. **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 address `https://{{accountName}}}.myvtex.com` of your account, where `{{accountName}}` is your account name as described in the store's admin menu;\n19. **Authorized redirect URIs**: add the VTEX service URL: -`https://vtexid.vtex.com.br/VtexIdAuthSiteKnockout/ReceiveAuthorizationCode.ashx`\n    ![Configurações Aplicativo Web Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_10.png)\n\n20. After you complete these steps, your credentials will be displayed:\n    ![Cliente OAuth criado Google EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_11.png)\n    - Copy the **Client ID** from Google and paste it into the `Client Id` field in the VTEX ID admin.\n    - Copy the **client secret key** from Google and paste it into the `Client Secret` field in the VTEX ID admin.\n      ![Google OAuth](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/authentication/authentication-basics/adding-a-client-id-and-a-client-secret-to-log-in-with-google_12.png)  \n      Then, save the changes."}