|
@@ -139,11 +139,12 @@ Base class for `AccountsClient` / `AccountsServer`.
|
|
|
* `setupUsersCollection(users)` : configures the `users` collection obtained from the parent constructor, by applying `users.allow` to limite update rights to the document for the current user, and ensuring multiple MongoDB indexes.
|
|
|
* `updateOrCreateUserFromExternalService(serviceName, serviceData, options)`: Updates or creates a user after we authenticate with a 3rd party.
|
|
|
* `@param serviceName` {String} Service name (eg, twitter).
|
|
|
- * `@param serviceData` {Object} Data to store in the user's record under services[serviceName]. Must include an "id" field which is a unique identifier for the user in the service.
|
|
|
+ * `@param serviceData` {Object} Data to store in the user's record under services[serviceName]. Must include an "id" field which is a unique identifier for the user in the service. (Side note: there is a specific kludge for old Twitter ids).
|
|
|
* `@param options` {Object, optional} Other options to pass to insertUserDoc (eg, profile)
|
|
|
- * `@returns` {Object} Object with token and id keys, like the result of the "login" method.
|
|
|
+ * `@returns` {Object} Object with `token` and `id` (actually `userId`) keys, like the result of the `login` method.
|
|
|
* "internal" services `resume` and `password` may not use this
|
|
|
- *
|
|
|
+ * does NOT update `profile` but updates `serviceData`
|
|
|
+ * Not completely stable. Per docs: _XXX provide an onUpdateUser hook which would let apps update the profile too_
|
|
|
|
|
|
* `userId()`: overrides the unimplemented version in `AccountsCommon`. This function only works if called inside a method, throws otherwise.
|
|
|
* `usingOAuthEncryption()`: is OAuth encryption present AND is a key loaded ?
|