new AnonymousUtils()
Provides utility functions for working with Anonymously logged-in users.
Anonymous users have some unique characteristics:
- Anonymous users don't need a user name or password.
- Once logged out, an anonymous user cannot be recovered.
- signUp converts an anonymous user to a standard user with the given username and password.
- Data associated with the anonymous user is retained.
- logIn switches users without converting the anonymous user.
- Data associated with the anonymous user will be lost.
- Service logIn (e.g. Facebook, Twitter) will attempt to convert the anonymous user into a standard user by linking it to the service.
- If a user already exists that is linked to the service, it will instead switch to the existing user.
- Service linking (e.g. Facebook, Twitter) will convert the anonymous user into a standard user by linking it to the service.
Methods
(static) isLinked(user) → {boolean}
Gets whether the user has their account linked to anonymous user.
Parameters:
Name | Type | Description |
---|---|---|
user |
Parse.User
|
User to check for. The user must be logged in on this device. |
Returns:
- Type:
-
boolean
true
if the user has their account
linked to an anonymous user.
(static) isRegistered() → {boolean}
Returns true if Authentication Provider has been registered for use.
Returns:
- Type:
-
boolean
(static) link(user, options) → {Promise}
Links Anonymous User to an existing PFUser.
Parameters:
Name | Type | Description |
---|---|---|
user |
Parse.User
|
User to link. This must be the current user. |
options |
object
|
MasterKey / SessionToken. |
Returns:
- Type:
-
Promise
Linked with User
(static) logIn(options) → {Promise}
Logs in a user Anonymously.
Parameters:
Name | Type | Description |
---|---|---|
options |
object
|
MasterKey / SessionToken. |
Returns:
- Type:
-
Promise
Logged in user