VTEX inStore
How to customize inStoreCustomize inStore login options
To allow your inStore sales associates to use custom login options, such as using their Google or Facebook accounts, follow the instructions in this guide.
Prerequisites
Make sure you meet these requirements before you proceed with the customization:
- When you add a new sales associate to inStore, you should register them with their Google email address — if you want them to log in with Google — or the email address registered on their Facebook account — if you want them to log in with Facebook.
- It is necessary that you enable using Google or Facebook accounts as login options in your VTEX account, by following the instructions in this article.
Edit the checkout-instore-custom.js
file
To set custom login options, you can copy the example code below and insert it in the checkout-instore-custom.js
file, using different value combinations for the auth
object properties: showLoginAndPassword
, showSaml
, and oAuthProviderName
.
window.INSTORE_CONFIG = {
auth: {
showLoginAndPassword: true,
showSaml: false,
oAuthProviderName: 'Google',
},
}
Read the description of each property before applying customizations:
Name | Type | Description | Possible values |
---|---|---|---|
showLoginAndPassword | boolean | Always show the option to log in using email and password. By default, this option is set to true . Set to false to hide email and password form. | true or false |
showSaml | boolean | Always show the option to log in via SAML if it is configured on VTEX ID. By default, this option is set to true . Set to false to hide the option to log in via SAML. | true or false |
oAuthProviderName | string | Always show the option to log in with either Google or Facebook, if the option is configured on VTEX ID. By default, this option is set as undefined , that is, set not to show on the login page.Set it to a valid OAuth provider to VTEX ID knowledge and this login option will appear if there is no SAML login configured on VTEX ID and if the showSaml option is set to false also. | Google or Facebook |