You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-23Lines changed: 21 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,48 +42,36 @@ If you are targeting mobile audiences, it's recommended that you add:
42
42
43
43
## API
44
44
45
-
### new Auth0Lock(clientID, domain, options, callback)
45
+
### new Auth0Lock(clientID, domain, options)
46
46
47
47
Initializes a new instance of `Auth0Lock` configured with your application `clientID` and your account's `domain` at [Auth0](https://manage.auth0.com/). You can find this information at your [application settings](https://manage.auth0.com/#/applications).
48
48
49
49
-**clientId {String}**: Your application _clientId_ in Auth0.
50
50
-**domain {String}**: Your Auth0 _domain_. Usually _your-account.auth0.com_.
51
51
-**options {Object}**: Allows to customize the dialog's appearance and behavior. See [below](#customization) for the details.
52
-
-**callback {function}**: Will be invoked after an attempt to authenticate the user.
53
52
54
53
#### Example
55
54
56
55
```js
57
56
var clientId ="YOUR_AUTH0_APP_CLIENTID";
58
57
var domain ="YOUR_DOMAIN_AT.auth0.com";
59
-
var lock =newAuth0Lock(clientId, domain, {},
60
-
function(error, result) {
61
-
// Will always be executed. Execution will happen on a later frame, so the
62
-
// `lock` variable and everything will be available on scope.
-`show`: emitted when Lock is shown. Has no arguments.
97
+
-`hide`: emitted when Lock is hidden. Has no arguments.
98
+
-`unrecoverable_error`: emitted when there is an unrecoverable error, for instance when no connection is available. Has the error as the only argument.
99
+
-`authenticated`: emitted after a successful authentication. Has the authentication result as the only argument.
100
+
-`authorization_error`: emitted when authorization fails. Has error as the only argument.
101
+
104
102
### Customization
105
103
106
104
The appearance of the widget and the mechanics of authentication can be customized with an `options` object which has one or more of the following properties. Each method that opens the dialog can take an `options` object as its first argument.
0 commit comments