Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
Tutorials
Tutorials
Explore in-depth tutorials for operating your VTEX store.
Tutorials
Authentication
Authentication basics
Adding Client ID and Client Secret for Facebook Login
Adding Client ID and Client Secret for Facebook Login

To enable login via Facebook, in your VTEX Admin, go to Account Settings > Authentication and complete the Client ID and Client Secret fields, as described in the Configuring login with Facebook and Google article.

{"base64":"  ","img":{"width":913,"height":533,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":16899,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Authentication/Authentication%20basics/adding-a-client-id-and-a-client-secret-to-log-in-with-facebook_1.PNG"}}

To get these credentials, follow the instructions below:

  1. Create an app
  2. Configure Facebook Login in the app
  3. Configure the app's basic settings

1. Creating an app

To begin, you need to create a Facebook application by following the steps below:

  1. Access the Meta for Developers website.

  2. Create a Facebook developer account.

  3. Once logged in, click My Apps in the top bar.

  4. Click Create App.

  5. Click Allow people to log in with their Facebook account from the options shown below.

    {"base64":"  ","img":{"width":826,"height":561,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":87894,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Authentication/Authentication%20basics/adding-a-client-id-and-a-client-secret-to-log-in-with-facebook_2.png"}}

  6. Click Next.

  7. Enter the app name and the email address of the person in charge of the app in the fields illustrated below.

    {"base64":"  ","img":{"width":1045,"height":461,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":67077,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Authentication/Authentication%20basics/adding-a-client-id-and-a-client-secret-to-log-in-with-facebook_3.png"}}

  8. Click Create app.

2. Configuring Facebook Login in the app

The next step is to set up the Facebook Login product in the app you created. To do this, follow the instructions below:

  1. Click Products in the side menu or the Meta for Developers Dashboard, as in the image below.

{"base64":"  ","img":{"width":1595,"height":726,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":128205,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Authentication/Authentication%20basics/adding-a-client-id-and-a-client-secret-to-log-in-with-facebook_4.png"}}

  1. Click Configure and select Settings.

    {"base64":"  ","img":{"width":1033,"height":337,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":45315,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Authentication/Authentication%20basics/adding-a-client-id-and-a-client-secret-to-log-in-with-facebook_5.png"}}

  2. Set the options as in the image below:

    {"base64":"  ","img":{"width":961,"height":697,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":89155,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Authentication/Authentication%20basics/adding-a-client-id-and-a-client-secret-to-log-in-with-facebook_6.png"}}

    Insert the following URLs in Valid OAuth Redirect URIs, replacing {{HOST_URL}} with your store's base URL and e {{accountName}} with your VTEX account name as described in the store's Admin:

    • https://vtexid.vtex.com.br/VtexIdAuthSiteKnockout/ReceiveAuthorizationCode.ashx
    • https://{{HOST_URL}}/api/vtexid/pub/authentication/oauth/authorizationcode
    • https://{{accountName}}.myvtex.com/api/vtexid/pub/authentication/oauth/authorizationcode
  3. At the bottom of the page, click the Save Changes button.

3. Configuring the app's basic settings

Finally, you must complete specific information about the app to finish the registration process. In this step, you will obtain the Client ID and Client Secret. These will be used when configuring the Facebook login settings in the VTEX Admin. Please follow the steps below:

  1. In the Meta for Developers side menu, go to App settings and click Basic:

{"base64":"  ","img":{"width":296,"height":116,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":4869,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Authentication/Authentication%20basics/adding-a-client-id-and-a-client-secret-to-log-in-with-facebook_7.png"}}

  1. Copy the value from the App ID field. You must enter this value in the Client ID field when configuring Facebook Login in the VTEX Admin.
  2. Under App Secret, click the Show button, and then copy the value from the field. You must enter this value in the Client Secret field when configuring Facebook Login in the VTEX Admin.
  3. Add the link to your store's terms of service in the Terms of Service URL field.
  4. Under App Icon (1024 x 1024), add an icon of exactly 1024x1024 pixels and a transparent background for your app.
  5. Choose a Category. For stores, we recommend using Shopping.
  6. Below in this form, complete the Data Protection Officer Contact Information with the details of the company running the store.
  7. At the bottom of the page, click Save Changes.

Once you have completed all these steps, you can use the Client ID and Client Secret you obtained to configure Facebook Login in your store, as detailed in the Configuring login with Facebook and Google article.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback