Meteor-Unity  3
A C#-based SDK for connecting Unity to Meteor servers
Static Public Member Functions | Static Public Attributes | Properties | Events | List of all members
Meteor.Accounts Class Reference

Contains all the methods used to create and manage user accounts. More...

Static Public Member Functions

static Coroutine LoginWithFacebook ()
 Logs in with Facebook. Requires the Facebook SDK and the compile preprocessor symbol FACEBOOK defined. More...
 
static Coroutine LoginWithGoogle ()
 Logs in with a Google account. Currently not supported. More...
 
static Method< LoginResultLoginWithToken ()
 Log in with a saved token. More...
 
static Method< LoginResultLoginWith (string username, string password)
 Log in with a specified username and password. See the method documentation for correctly executing methods. Meteor.Method`1. More...
 
static Coroutine LoginAsGuest ()
 Login as a guest. Use inside an IEnumerator/Coroutine. More...
 
static Method< LoginResultCreateAndLoginWith (string email, string username, string password)
 Creates a user. This function logs in as the newly created user on successful completion. You must pass password and at least one of username or email — enough information for the user to be able to log in again later. If there are existing users with a username or email only differing in case, createUser will fail. More...
 

Static Public Attributes

static string GuestEmailDomain = "example.com"
 The email domain used for guest accounts. More...
 
static string FacebookScope = "email"
 The permissions requested by a Facebook login. More...
 

Properties

static Meteor.Internal.ICollection Users [get]
 The users collection. More...
 
static bool IsLoggedIn [get]
 Is the user currently logged in? More...
 
static Error Error [get]
 The error if a login was attempted. More...
 
static LoginResult Response [get]
 The result of logging in. More...
 
static string UserId [get]
 The User's ID. More...
 
static string Token [get]
 The Meteor login token. Generally you will not use this directly unless you need to save it in a different service. Accounts automatically saves tokens from successful login attempts for you. More...
 

Events

static Action< Error, LoginResultLoginMethodWillComplete
 This event is raised when the login method is about to complete. More...
 
static Action< Error, LoginResultLoginMethodDidComplete
 This event is raised when the login method did complete. More...
 

Detailed Description

Contains all the methods used to create and manage user accounts.

Member Function Documentation

static Method<LoginResult> Meteor.Accounts.CreateAndLoginWith ( string  email,
string  username,
string  password 
)
inlinestatic

Creates a user. This function logs in as the newly created user on successful completion. You must pass password and at least one of username or email — enough information for the user to be able to log in again later. If there are existing users with a username or email only differing in case, createUser will fail.

Returns
The and login with.
Parameters
emailEmail. Currently unsupported.
usernameUsername.
passwordPassword.
static Coroutine Meteor.Accounts.LoginAsGuest ( )
inlinestatic

Login as a guest. Use inside an IEnumerator/Coroutine.

yield return Meteor.Accounts.LoginAsGuest();

Returns
The as guest.
static Method<LoginResult> Meteor.Accounts.LoginWith ( string  username,
string  password 
)
inlinestatic

Log in with a specified username and password. See the method documentation for correctly executing methods. Meteor.Method`1.

Returns
A method instance. This can be cast to a coroutine you can execute in an IEnumerator/Coroutine. Meteor.Method`1.
Parameters
usernameUsername.
passwordPassword.
static Coroutine Meteor.Accounts.LoginWithFacebook ( )
inlinestatic

Logs in with Facebook. Requires the Facebook SDK and the compile preprocessor symbol FACEBOOK defined.

Returns
The with facebook.
static Coroutine Meteor.Accounts.LoginWithGoogle ( )
inlinestatic

Logs in with a Google account. Currently not supported.

Returns
A Coroutine used to execute the login.
static Method<LoginResult> Meteor.Accounts.LoginWithToken ( )
inlinestatic

Log in with a saved token.

Returns
A method. See the method document to correctly execute methods. Meteor.Method`1

Member Data Documentation

string Meteor.Accounts.FacebookScope = "email"
static

The permissions requested by a Facebook login.

string Meteor.Accounts.GuestEmailDomain = "example.com"
static

The email domain used for guest accounts.

Property Documentation

Error Meteor.Accounts.Error
staticget

The error if a login was attempted.

The error.

bool Meteor.Accounts.IsLoggedIn
staticget

Is the user currently logged in?

true if is logged in; otherwise, false.

LoginResult Meteor.Accounts.Response
staticget

The result of logging in.

The response.

string Meteor.Accounts.Token
staticget

The Meteor login token. Generally you will not use this directly unless you need to save it in a different service. Accounts automatically saves tokens from successful login attempts for you.

The token.

string Meteor.Accounts.UserId
staticget

The User's ID.

The user identifier.

Meteor.Internal.ICollection Meteor.Accounts.Users
staticget

The users collection.

The users.

Event Documentation

Action<Error, LoginResult> Meteor.Accounts.LoginMethodDidComplete
static

This event is raised when the login method did complete.

Action<Error, LoginResult> Meteor.Accounts.LoginMethodWillComplete
static

This event is raised when the login method is about to complete.


The documentation for this class was generated from the following file: