Last active
June 20, 2018 03:45
-
-
Save nzpcmad/58384013b67153098e0071f227f007bd to your computer and use it in GitHub Desktop.
Auth0 playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the box at the top: | |
//cdn.auth0.com/js/lock/10.13.0/lock.min.js | |
Code follows: | |
var domain = 'xxx.auth0.com'; | |
var clientID = '1gB0...wB7FjSa5P'; | |
var options = { | |
allowSignUp: true, | |
allowForgotPassword: true, | |
additionalSignUpFields: [{ | |
name: "address", | |
placeholder: "enter your address", | |
// The following properties are optional | |
icon: "https://example.com/assests/address_icon.png", | |
prefill: "street 123", | |
validator: function(address) { | |
return { | |
valid: address.length >= 10, | |
hint: "Must have 10 or more chars" // optional | |
}; | |
} | |
}, | |
{ | |
name: "full_name", | |
placeholder: "Enter your full name" | |
}, | |
{ | |
type: "select", | |
name: "location", | |
placeholder: "choose your location", | |
options: [ | |
{value: "us", label: "United States"}, | |
{value: "fr", label: "France"}, | |
{value: "ar", label: "Argentina"} | |
], | |
// The following properties are optional | |
icon: "https://example.com/assests/location_icon.png", | |
prefill: "us" | |
}, | |
{ | |
type: "checkbox", | |
name: "newsletter", | |
prefill: "true", | |
placeholder: "I hereby agree that I want to receive marketing emails from your company" | |
} | |
] | |
}; | |
var lock = new Auth0Lock(clientID, domain, options); | |
lock.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://nzpcmad.blogspot.com/2018/06/auth0-playground.html