Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_parse_authentication

Plugin, ACE table, Discussion thread
Dependence:
rex_parse_initialize

Introduction
Authentication which is provided by parse.

Usage

Sample capx
Prepare
Add 
rex_parse_initialize to set api id and javascript key.
Create account
Call "Action:Create account" to create account.
"
Condition:On creating account successfully" will be triggered if creating successful,
otherwise "Condition:On creating account error" for creating error. Get error message by "Expression:ErrorMessage" or error code by "Expression:ErrorCode".
Add initial user data
Call "
Action:Set value" or "Action:Set boolean value" before "
Action:Create account" to add extra initial user data.
Login
Call "Action:Login"
to login by user name & password.
"Condition:On login successfully" will be triggered if login successful; otherwise "Condition:On login error" will be triggered.
Get user name and user ID by "
Expression:UserName" and "Expression:UserID".
Logging out
Call "
Action:Logging out" to log out.
Is login
"Condition:Is login" will return true if logging in now.

Sign up & login
Sample capx
Call "
Action:Sign up & Login" to login with user name and password. It would try to sign up if the account had not existed.
(This feature is merged from rex_parse_QuickLogin plugin.)
"
Condition:Is first login" will return true if login first time.

Authentication by third-party providers
Sample capx
This plugin does not support any third-party authentication yet.
User could run
third-party authentication by rex_firebase_Authentication plugin. Then uses two unique strings like userID and access token for user name and password in this plugin.
Lists steps
as follows:
  1. Authentication by rex_firebase_Authentication plugin. It supports authentication. with Facebook, or Twitter, or GitHub, or Google.
  2. Get userID and access token by "Expression:UserID", "Expression:AccessToken" under "Condition:On login successfully" of rex_firebase_Authentication plugin.
  3. Create or login account by user name to userID ("Expression:UserID") and password to access token ("Expression:AccessToken") using "Action:Sign up & Login" in this plugin.
  4. After login parse, call "Action:Logging out" and "Action:Go offline" of firebase to close the connection in firebase.

Login counter
Set "
Login counter" to "Yes" to enable counting login times.
Get login counter by "
Expression:LoginCount", return 1 while 1st login, return 2 is 2nd login, and so on,

Tutorial by Jomo
_

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About