diff --git a/History.md b/History.md index 2174d000d7..8b6b059b32 100644 --- a/History.md +++ b/History.md @@ -4,13 +4,18 @@ being used to change the password now get deleted, which results in other clients being logged out. + +## v0.7.2 + * Support oplog tailing on queries with the `limit` option. All queries except those containing `$near` or `$where` selectors or the `skip` option can now be used with the oplog driver. -* Add hooks to login process. This allows for rate limiting login - attempts, logging an audit trail, account lockout flags, etc. See: - http://docs.meteor.com/#accounts_validLoginAttempt #1815 +* Add hooks to login process: `Accounts.onLogin`, + `Accounts.onLoginFailure`, and `Accounts.validateLoginAttempt`. These + functions allow for rate limiting login attempts, logging an audit + trail, account lockout flags, and more. See: + http://docs.meteor.com/#accounts_validateloginattempt #1815 * Change the `Accounts.registerLoginHandler` API for custom login methods. Login handlers now require a name and no longer have to deal diff --git a/docs/.meteor/release b/docs/.meteor/release index 5a848a1d77..7486fdbc50 100644 --- a/docs/.meteor/release +++ b/docs/.meteor/release @@ -1 +1 @@ -0.7.1.2 +0.7.2 diff --git a/docs/client/api.html b/docs/client/api.html index bc752a7dc1..62991b5167 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -1752,6 +1752,14 @@ Example: return user.username !== "root"; }); +If the user is being created as part of a login attempt from a client (eg, +calling [`Accounts.createUser`](#accounts_createuser) from the client, or +[logging in for the first time with an external +service](#meteor_loginwithexternalservice)), these callbacks are called *before* +the [`Accounts.validateLoginAttempt`](#accounts_validateloginattempt) +callbacks. If these callbacks succeed but those fail, the user will still be +created but the connection will not be logged in as that user. + {{> api_box accounts_onCreateUser}} Use this when you need to do more than simply accept or reject new user @@ -1823,6 +1831,11 @@ are called with a single argument, the attempt info object: object. This will always be present for successful logins. {{/dtdd}} +{{#dtdd name="connection" type="Object"}} + The `connection` object the request came in on. See + [`Meteor.onConnection`](#meteor_onconnection) for details. +{{/dtdd}} + {{#dtdd name="methodName" type="String"}} The name of the Meteor method being used to login. {{/dtdd}} @@ -1845,23 +1858,18 @@ successful. {{> api_box accounts_onLogin}} -Call `onLogin` or `onLoginFailure` with a callback to be called when a -login is successful or is unsuccessful. These functions return an -object with a single method, `stop`. Calling `stop()` unregisters the -callback. - Either the `onLogin` or the `onLoginFailure` callbacks will be called for each login attempt. The `onLogin` callbacks are called after the -user has been logged in. +user has been successfully logged in. The `onLoginFailure` callbacks are +called after a login attempt is denied. + +These functions return an object with a single method, `stop`. Calling +`stop()` unregisters the callback. The callbacks are called with a single argument, the same attempt info object as [`validateLoginAttempt`](#accounts_validateloginattempt). -{{> api_box accounts_onLoginFailure}} - - -

Passwords

The `accounts-password` package contains a full system for password-based diff --git a/docs/client/api.js b/docs/client/api.js index 830b610df0..ab028551c9 100644 --- a/docs/client/api.js +++ b/docs/client/api.js @@ -1273,28 +1273,14 @@ Template.api.accounts_validateLoginAttempt = { Template.api.accounts_onLogin = { id: "accounts_onlogin", - name: "Accounts.onLogin(func)", + name: "Accounts.onLogin(func) and Accounts.onLoginFailure(func)", locus: "Server", - descr: ["Register a callback to be called after a login is successful."], + descr: ["Register a callback to be called after a login attempt."], args: [ { name: "func", type: "Function", - descr: "The callback to be called after a login is successful." - } - ] -}; - -Template.api.accounts_onLoginFailure = { - id: "accounts_onloginfailure", - name: "Accounts.onLoginFailure(func)", - locus: "Server", - descr: ["Register a callback to be called when a login is attempted and is unsuccessful. See [`Accounts.onLogin`](#accounts_onlogin) for details."], - args: [ - { - name: "func", - type: "Function", - descr: "The callback to be called after an unsuccessful login." + descr: "The callback to be called after the login attempt" } ] }; diff --git a/docs/client/docs.js b/docs/client/docs.js index 17c599291e..75d09ea0c5 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -214,7 +214,7 @@ var toc = [ "Accounts.onCreateUser", "Accounts.validateLoginAttempt", "Accounts.onLogin", - "Accounts.onLoginFailure" + {name: "Accounts.onLoginFailure", id: "accounts_onlogin"}, ], {name: "Passwords", id: "accounts_passwords"}, [ diff --git a/docs/lib/release-override.js b/docs/lib/release-override.js index 523bf17b11..b99159cbf3 100644 --- a/docs/lib/release-override.js +++ b/docs/lib/release-override.js @@ -1,5 +1,5 @@ // While galaxy apps are on their own special meteor releases, override // Meteor.release here. if (Meteor.isClient) { - Meteor.release = Meteor.release ? "0.7.1.2" : undefined; + Meteor.release = Meteor.release ? "0.7.2" : undefined; } diff --git a/examples/leaderboard/.meteor/release b/examples/leaderboard/.meteor/release index 5a848a1d77..7486fdbc50 100644 --- a/examples/leaderboard/.meteor/release +++ b/examples/leaderboard/.meteor/release @@ -1 +1 @@ -0.7.1.2 +0.7.2 diff --git a/examples/parties/.meteor/release b/examples/parties/.meteor/release index 5a848a1d77..7486fdbc50 100644 --- a/examples/parties/.meteor/release +++ b/examples/parties/.meteor/release @@ -1 +1 @@ -0.7.1.2 +0.7.2 diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release index 5a848a1d77..7486fdbc50 100644 --- a/examples/todos/.meteor/release +++ b/examples/todos/.meteor/release @@ -1 +1 @@ -0.7.1.2 +0.7.2 diff --git a/examples/wordplay/.meteor/release b/examples/wordplay/.meteor/release index 5a848a1d77..7486fdbc50 100644 --- a/examples/wordplay/.meteor/release +++ b/examples/wordplay/.meteor/release @@ -1 +1 @@ -0.7.1.2 +0.7.2 diff --git a/scripts/admin/banner.txt b/scripts/admin/banner.txt index e672e9ae21..571b063d08 100644 --- a/scripts/admin/banner.txt +++ b/scripts/admin/banner.txt @@ -1,4 +1,5 @@ -=> Meteor 0.7.1.2: Fix crash on OSX machines with no hostname set. +=> Meteor 0.7.2: Support limit queries in the oplog tailing driver. Add + hooks to customize the login process. This release is being downloaded in the background. Update your - project to Meteor 0.7.1.2 by running 'meteor update'. + project to Meteor 0.7.2 by running 'meteor update'. diff --git a/scripts/admin/notices.json b/scripts/admin/notices.json index 835f91f1f8..f63180f934 100644 --- a/scripts/admin/notices.json +++ b/scripts/admin/notices.json @@ -91,6 +91,9 @@ { "release": "0.7.1.2" }, + { + "release": "0.7.2" + }, { "release": "NEXT" }