Skip to content

Commit cc36a64

Browse files
committed
updated docs
1 parent 9026e76 commit cc36a64

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/api.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,16 @@ Returns true if attempting to login
6565

6666
Returns true if attempting to logout
6767

68-
### `Meteor.loginWithPassword`
68+
### `Meteor.loginWithPassword(selector, password, callback)`
69+
70+
Logs a user in. If selector is a string containing `@`, then this will be interpreted as an email, other strings as a username. The selector can also be an object with a single key `email`, `id` or `username`.
71+
The optional Callback is called with a single `Error` argument on failure.
72+
73+
If 2fa is enabled, the `error` property of the argument may be `no-2fa-code`. Read more in [the Meteor docs](https://docs.meteor.com/api/accounts#Meteor-loginWithPassword)
74+
75+
### `Meteor.loginWithPasswordAnd2faCode(selector, password, code, callback)`
76+
77+
Logs a user in, same as `loginWithPassword`, but providing a 2fa token via the argument `code`. Read more on this [in the Meteor docs](https://docs.meteor.com/packages/accounts-2fa.html).
6978

7079
### `Meteor.logout`
7180

0 commit comments

Comments
 (0)