Skip to content

Instantly share code, notes, and snippets.

@pazel-io

pazel-io/lock.js Secret

Created January 9, 2022 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pazel-io/c0f9167afcebe3a573c2571881cbeada to your computer and use it in GitHub Desktop.
Save pazel-io/c0f9167afcebe3a573c2571881cbeada to your computer and use it in GitHub Desktop.
Auth0 lock with additional SignUp Fields
// Available Lock configuration options: https://auth0.com/docs/libraries/lock/v11/configuration
var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
...,
additionalSignUpFields: [{
name: "phone_number",
placeholder: "Enter your phone number",
// The following properties are optional
validator: function(phoneNumber) {
return {
valid: phoneNumber.length >= 10,
hint: "Must have 10 or more digits" // optional
};
}
}],
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment