# Auth0.js Call passwordless failed: "Client authentication is required"

**URL:** <https://community.auth0.com/t/auth0-js-call-passwordless-failed-client-authentication-is-required/73612>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [November 23, 2021, 7:37am UTC](https://community.auth0.com/t/auth0-js-call-passwordless-failed-client-authentication-is-required/73612 "2021-11-23T07:37:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![san.phan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/san.phan/32/26975_2.png) [@san.phan](https://community.auth0.com/u/san.phan)\
**Post date:** [November 23, 2021, 7:37am UTC](https://community.auth0.com/t/auth0-js-call-passwordless-failed-client-authentication-is-required/73612/1 "2021-11-23T07:37:20Z")

</div>

Please include the following information in your post:

Auth0.js  
SDK Version: v9.18.0  
Platform Version:\*\* e.g. Node 12.19.0  
Code Snippets/Error Messages/Supporting Details/Screenshots:

Hi, I’m developing the login page use Auth0.js.  
I tried to implement simple page as below:

```auto
<body>
    <button id="pwd-start">Passwordless Start</button>
    <button id="pwd-verify">Passwordless Verify</button>
    <button id="logout">Log out</button>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/latest/js.cookie.min.js"></script>
    <script src="https://cdn.auth0.com/js/auth0/9.18.0/auth0.min.js"></script>
    <script src="/cordova-auth0-plugin.js"></script>

    <script type="application/javascript">
      const pwdStartButton = document.getElementById('pwd-start');
      const pwdVerifyButton = document.getElementById('pwd-verify');
      const logoutButton = document.getElementById('logout');
      const options = {
        domain: 'xxxxx.au.auth0.com',
        clientID: 'xxxxxxxx',
        redirectUri: 'http://localhost:3000/login.html',
        responseType: 'id_token',
        audience: 'https://xxxxx-c/api',
        scope: "openid profile email"
      };

      var passwordlessEmail;

      pwdStartButton.addEventListener('click', () => {
        const webAuth = new auth0.WebAuth({
          ...options,
          responseType: 'id_token token'
        });

        const phone = prompt('Enter your phone');

        if (phone) {
          webAuth.passwordlessStart(
            {
              connection: 'sms',
              send: 'code',
              phoneNumber: phone
            },
            (err, result) => {
              if (err) return console.error(err);
              console.log(result);
              passwordlessEmail = phone;
              alert('Done! Check your phone');
            }
          );
        }
      });

      pwdVerifyButton.addEventListener('click', () => {
        const webAuth = new auth0.WebAuth({
          ...options,
          responseType: 'id_token token'
        });

        const verificationCode = prompt('Enter the code');

        if (!passwordlessEmail) {
          passwordlessEmail = prompt(
            'Enter the email address to which the code was sent'
          );
        }

        if (verificationCode) {
          webAuth.passwordlessLogin(
            {
              connection: 'sms',
              verificationCode,
              phoneNumber: passwordlessEmail,
              onRedirecting: done => {
                console.log('Redirecting passwordless...');
                done();
              }
            },
            (err, res) => {
              if (err) console.error(err);
              console.log(res);
            }
          );
        }
      });

      logoutButton.addEventListener('click', () => {
        const webAuth = new auth0.WebAuth(options);
        webAuth.logout({ returnTo: 'http://localhost:3000/login.html' });
      });

      window.onload = function() {
        const webAuth = new auth0.WebAuth(options);

        webAuth.parseHash((err, data) => {
          console.log(data);
          window.location.hash = '';
        });
      };
    </script>
  </body>

```

But when click “Passwordless Start” button with request:/passwordless/start  
Then response:  
{“error”:“unauthorized\_client”,“error\_description”:“Client authentication is required”}

I’ve been looking at the documentation and have found nothing related to this.

---

<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:** [November 23, 2021, 10:13am UTC](https://community.auth0.com/t/auth0-js-call-passwordless-failed-client-authentication-is-required/73612/2 "2021-11-23T10:13:15Z")

</div>

Hey there!

Sorry for redirecting you to another medium but in this case the most effective way of getting help is to raise a GitHub issue in Auth0.js repo here:

> **[Build software better, together](https://github.com/auth0/auth0.js/issues/new/choose)**
>
> GitHub is where people build software. More than 94 million people use GitHub to discover, fork, and contribute to over 330 million projects.

Once you have a link to it you can share it here so we can ping repo maintainers. Thank you!

---

<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 7, 2021, 2:32pm UTC](https://community.auth0.com/t/auth0-js-call-passwordless-failed-client-authentication-is-required/73612/3 "2021-12-07T14:32:06Z")

</div>


