Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming internal signOut methods with logout to keep it consistent #966

Merged
merged 2 commits into from
Apr 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,18 @@ lock.resumeAuth(hash, function(error, authResult) {
});
```

### logout(options)

Logs out the user

- **options {Object}**: This is optional and follows the same rules as [this](https://auth0.com/docs/libraries/auth0js#logout)

#### Example

```js
lock.logout({ returnTo: 'https://myapp.com/bye-bye' });
```

### Customization

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.
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default class Base extends EventEmitter {
}

logout(query = {}) {
webAPI.signOut(this.id, query);
webAPI.logout(this.id, query);
}

update(f) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/web_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Auth0WebAPI {
this.clients[lockID].logIn(options, authParams, cb);
}

signOut(lockID, query) {
logout(lockID, query) {
this.clients[lockID].logout(query);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/web_api/legacy_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Auth0LegacyAPIClient {
}
}

signOut(query) {
logout(query) {
this.client.logout(query);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/web_api/p2_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Auth0APIClient {
}
}

signOut(query) {
logout(query) {
this.client.logout(query);
}

Expand Down
2 changes: 1 addition & 1 deletion support/design/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ WebAPI.prototype.logIn = function(lockID, options, authParams, cb) {
setTimeout(() => cb(...args), state.get("latency"));
};

WebAPI.prototype.signOut = function() {};
WebAPI.prototype.logout = function() {};

WebAPI.prototype.signUp = function(lockID, options, cb) {
const state = store.deref();
Expand Down