Auth0 Home Blog Docs

At least one database, enterprise or social connection needs to be available

lock
passwordless

#1

Our company is attempting to use Auth0LockPasswordless with an SMS connection named ‘sms’ as the only way to sign up. We’re also on our custom domain login.companyname.com. However, whenever we try to instantiate a new lock object, we get the error:

"At least one database, enterprise or social connection needs to be available."

Even though our SMS connection is set up with Twilio and activated for this application, and whenever we try to show the lock, we get a technical error message. The error goes away if I add a regular database connection, but then the ui prompts the user to sign up with username and password. Our lock instantiation (which appears to comply with official docs) is:

this.lock = new Auth0LockPasswordless(clientID, domain, {
            auth: {
                redirectUrl: redirectUrl,
                responseType: 'token id_token',
            },            
            allowedConnections: ['sms'],
            rememberLastLogin: true,
            configurationBaseUrl: 'https://cdn.auth0.com',
            passwordlessMethod: 'link',
            languageDictionary: {
              title: '',
              passwordlessSMSInstructions: 'Our instructions'
            },
            theme: {
              logo: 'https://cdn.companyname.com/logo.png',
              primaryColor: '#FF3446'
            },
            closable: true,
});

Any help would be greatly appreciated!


#2

I discovered what the problem was - a silly javascript error. For the benefit of others, make sure that when you’re importing Auth0Passwordless from ‘auth0-lock’, you’re importing it with curly braces as:

import { Auth0Passwordless } from 'auth0-lock'


#3

Great that you’ve figured out this one @jon3! :raised_hands:t3: