# Errors in Lock and passwordless SMS login

**URL:** <https://community.auth0.com/t/errors-in-lock-and-passwordless-sms-login/9406>\
**Category:** Get Help\
**Tags:** passwordless-sms, swift, sms, passwordless, login\
**Created:** [February 6, 2018, 1:08am UTC](https://community.auth0.com/t/errors-in-lock-and-passwordless-sms-login/9406 "2018-02-06T01:08:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug.wk.yuen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/doug.wk.yuen/32/7649_2.png) [@doug.wk.yuen](https://community.auth0.com/u/doug.wk.yuen)\
**Post date:** [February 6, 2018, 1:08am UTC](https://community.auth0.com/t/errors-in-lock-and-passwordless-sms-login/9406/1 "2018-02-06T01:08:53Z")

</div>

I’m currently building a passwordless login system for a Swift app using Lock, and I’m using Twilio to send the SMS OTCs after a user enters their phone number into the app. The code itself for opening the Lock UI is as follows:

```
func beginLogin()
{
        Lock.passwordless()
            .onAuth(){credentials, error in
                print("OKAY, GOT \(credentials)")
            }
            .present(from: self)
}

```

Twilio is properly configured, and I can get my OTCs back without any difficulty. However, when I enter the code into the field, the Lock UI displays an error message indicating that it was unable to get back the access token:

![alt text][1]

There aren’t any error messages in the debug console that indicate what went wrong, and my best guess is that I need to register that phone number as a user first, although I’m not too sure how to go about doing that. As a bit of additional information, I’ve enabled the SMS passwordless authentication already, and Twilio is properly configured. Disable sign-ups is also turned off, so I’m wondering if this setting is affecting things; my understanding is that if false, disable sign-ups should allow users to create a new Auth0 account with their phone numbers as a username?

---

<div class="post-metadata">

**Author:** ![idee4ril](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@idee4ril](https://community.auth0.com/u/idee4ril)\
**Post date:** [February 13, 2018, 12:08am UTC](https://community.auth0.com/t/errors-in-lock-and-passwordless-sms-login/9406/2 "2018-02-13T00:08:39Z")

</div>

@doug.wk.yuen Try it again and this time check the logs for why it failed - [https://manage.auth0.com/#/logs](https://manage.auth0.com/#/logs)

---

<div class="post-metadata">

**Author:** ![doug.wk.yuen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/doug.wk.yuen/32/7649_2.png) [@doug.wk.yuen](https://community.auth0.com/u/doug.wk.yuen)\
**Post date:** [February 13, 2018, 5:43am UTC](https://community.auth0.com/t/errors-in-lock-and-passwordless-sms-login/9406/3 "2018-02-13T05:43:42Z")

</div>

That did it, I was able to diagnose and fix the issue with information from the logs. Thanks!

---

<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 27, 2019, 10:32am UTC](https://community.auth0.com/t/errors-in-lock-and-passwordless-sms-login/9406/4 "2019-08-27T10:32:02Z")

</div>


