# Adding options to custom Hosted Lock page errors

**URL:** <https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528>\
**Category:** Get Help\
**Tags:** lock-11\
**Created:** [November 29, 2018, 9:49pm UTC](https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528 "2018-11-29T21:49:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbghone](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mbghone/32/9566_2.png) [@mbghone](https://community.auth0.com/u/mbghone)\
**Post date:** [November 29, 2018, 9:49pm UTC](https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528/1 "2018-11-29T21:49:07Z")

</div>

In the “Lock” hosted page. After adding an option (any option). Copy and pasted. Logging in fails and when I F12 this is what I get. Newby here, but a simple adding of an option seems straight forward. Thank you.

 ![image](https://global.discourse-cdn.com/auth0/original/2X/5/57f64d043ea448f6a25d5edfa19fc3049ea5f12d.png)

 Sign In with Auth0

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 30, 2018, 12:48am UTC](https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528/2 "2018-11-30T00:48:16Z")

</div>

Can you share the code you are trying to use?  
The first two `404` are expected, the `403` is weird. In the Network tab of the developer tools of the browser you can inspect the response content from that `403`, maybe it gives a clue of what’s going on.

---

<div class="post-metadata">

**Author:** ![mbghone](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mbghone/32/9566_2.png) [@mbghone](https://community.auth0.com/u/mbghone)\
**Post date:** [November 30, 2018, 1:06am UTC](https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528/3 "2018-11-30T01:06:24Z")

</div>

Thanks for the help! I am literally copying from the configuration guide and setting the option on the third paramater of Auth0Lock.

```plaintext
  <!--[if IE 8]>
  <script src="//cdnjs.cloudflare.com/ajax/libs/ie8/0.2.5/ie8.js"></script>
  <![endif]-->

  <!--[if lte IE 9]>
  <script src="https://cdn.auth0.com/js/base64.js"></script>
  <script src="https://cdn.auth0.com/js/es5-shim.min.js"></script>
  <![endif]-->

  <script src="https://cdn.auth0.com/js/lock/11.3/lock.min.js"></script>
  <script>
    // Decode utf8 characters properly
    var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@'))));
    config.extraParams = config.extraParams || {};
    var connection = config.connection;
    var prompt = config.prompt;
    var languageDictionary;
    var language;
    
    if (config.dict && config.dict.signin && config.dict.signin.title) {
      languageDictionary = { title: config.dict.signin.title };
    } else if (typeof config.dict === 'string') {
      language = config.dict;
    }
    var loginHint = config.extraParams.login_hint;
    
    // Available Lock configuration options: https://auth0.com/docs/libraries/lock/v11/configuration
var options = {
  allowAutocomplete: true
};
    var lock = new Auth0Lock(config.clientID, config.auth0Domain, options,{
      auth: {
        redirectUrl: config.callbackURL,
        responseType: (config.internalOptions || {}).response_type ||
          (config.callbackOnLocationHash ? 'token' : 'code'),
        params: config.internalOptions
      },
      /* additional configuration needed for custom domains
      configurationBaseUrl: config.clientConfigurationBaseUrl,
      overrides: {
        __tenant: config.auth0Tenant,
        __token_issuer: 'YOUR_CUSTOM_DOMAIN'
      }, */
      assetsUrl: config.assetsUrl,
      allowedConnections: connection ? [connection] : null,
      rememberLastLogin: !prompt,
      language: language,
      languageDictionary: languageDictionary,
      theme: {
        //logo: 'YOUR LOGO HERE',
        //primaryColor: 'green'
      },
      prefill: loginHint ? { email: loginHint, username: loginHint } : null,
      closable: false,
      defaultADUsernameFromEmailPrefix: false,
      // uncomment if you want small buttons for social providers
      // socialButtonStyle: 'small'
    });

    lock.show();

```

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 30, 2018, 1:13am UTC](https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528/4 "2018-11-30T01:13:11Z")

</div>

The Lock instance constructed in the default template for the hosted login page already contains an anonymous `options` object, the third parameter in the constructor (the one that has `auth`, `assetsUrl`, and so on):

```json
{
      auth: {
        redirectUrl: config.callbackURL,
        responseType: (config.internalOptions || {}).response_type ||
          (config.callbackOnLocationHash ? 'token' : 'code'),
        params: config.internalOptions
      },
      /* additional configuration needed for custom domains
      configurationBaseUrl: config.clientConfigurationBaseUrl,
      [...]

```

So if you want to add the `allowAutocomplete` option, simply add it to the existing `options` object. Like this:

```auto
    var lock = new Auth0Lock(config.clientID, config.auth0Domain,{
      // your custom option
      autoComplete: true,
      // leave all the other options as they were
      auth: {
        redirectUrl: config.callbackURL,
        responseType: (config.internalOptions || {}).response_type ||
          (config.callbackOnLocationHash ? 'token' : 'code'),
        params: config.internalOptions
      },
      // continue the default template

```

---

<div class="post-metadata">

**Author:** ![mbghone](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mbghone/32/9566_2.png) [@mbghone](https://community.auth0.com/u/mbghone)\
**Post date:** [November 30, 2018, 1:25am UTC](https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528/5 "2018-11-30T01:25:14Z")

</div>

OMG. I am such a rookie! Thanks, that was it. Great to have someone to lend a hand.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 6, 2018, 1:34pm UTC](https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528/6 "2018-12-06T13:34:20Z")

</div>

No worries @mbghone! Everyone has such moments no matter the experience 🙂

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [August 28, 2019, 2:38pm UTC](https://community.auth0.com/t/adding-options-to-custom-hosted-lock-page-errors/18528/7 "2019-08-28T14:38:51Z")

</div>


