Categories > Firebase > rex_firebase_authentication

Introduction

Authentication provided by firebase.

Links


Categories > Firebase > rex_firebase_authenticationIntroductionLinksDependenceUsageAuthenticate with Firebase using Password-Based AccountsCreate accountLoginLogging outChange passwordReset passwordUpdate profileDelete userAuthenticate Using Facebook LoginLoginLogin with access tokenLogging outAuthenticate Using Google Sign-InAuthenticate Using GitHubAuthenticate Using TwitterAuthenticate with Firebase AnonymouslyLoginAuthentication by authentication tokenLoginLink multiple auth providers to an accountLogin or logged out by other appDebug panel

Dependence

Usage

Authenticate with Firebase using Password-Based Accounts

Reference

Sample capx

Create account

CallbackYesNoActionis successCondition:On created accountCondition:On created account errorExpression:ErrorMessageExpression:ErrorCodeAction:Create account
  1. Action:Create account

  2. Callback

    • Success : Condition:On created account

    • Failed : Condition:On created account error

      • Error : Expression:ErrorMessage, Expression:ErrorCode (reference)

Login

CallbackYesNoActionis successCondition:On loginCondition:On login errorUserID Expression:UserID----Expression:ProviderExpression:DisplayNameExpression:UserIDFromProvideExpression:AccessTokenExpression:EmailExpression:PhotoURLExpression:ErrorMessageExpression:ErrorCodeAction:Login(category: Email & Password)
  1. Action:Login (category: Email & Password)

  2. Callback

    • Success : Condition:On login

      • `Expression:UserID, an unique user ID
      • Expression:Provider
      • Expression:DisplayName
      • Expression:UserIDFromProvide
      • Expression:AccessToken
      • Expression:Email
      • Expression:PhotoURL
    • Failed : Condition:On login error

      • Error : Expression:ErrorMessage, Expression:ErrorCode (reference)

Condition:Is login, returns true if logging in.

Logging out

CallbackCondition:On logged outAction:Logging out
  1. Action:Logging out
  2. Condition:On logged out

Change password

CallbackYesNoActionis successCondition:On changed passwordCondition:On changed password errorExpression:ErrorMessageExpression:ErrorCodeAction:Change password
  1. Action:Change password

  2. Callback

    • Success : Condition:On changed password

    • Failed : Condition:On changed password error

      • Error : Expression:ErrorMessage, Expression:ErrorCode

Reset password

CallbackYesNoActionis successCondition:On sent password reset emailCondition:On sent password reset email errorExpression:ErrorMessageExpression:ErrorCodeAction:Send password reset email
  1. Action:Send password reset email

  2. Callback

    • Success : Condition:On sent password reset email

    • Failed : Condition:On sent password reset email error

      • Error : Expression:ErrorMessage, Expression:ErrorCode (reference)

Update profile

CallbackYesNoActionis successCondition:On updated profileCondition:On updated profile errorExpression:ErrorMessageExpression:ErrorCodeAction:Update profile
  1. Action:Update profile

  2. Callback

    • Success : Condition:On updated profile

    • Failed : Condition:On updated profile error

      • Error : Expression:ErrorMessage, Expression:ErrorCode

Delete user

CallbackYesNoActionis successCondition:On deleted userCondition:On deleted user errorExpression:ErrorMessageExpression:ErrorCodeAction:Delete user
  1. Action:Delete user

  2. Callback

    • Success : Condition:On deleted user

    • Failed : Condition:On deleted user error

      • Error : Expression:ErrorMessage, Expression:ErrorCode

Authenticate Using Facebook Login

Reference

Sample capx

Login

CallbackYesNoAccess tokenActionis successCondition:On loginCondition:On login errorUserID Expression:UserID----Expression:ProviderExpression:DisplayNameExpression:UserIDFromProvideExpression:AccessTokenExpression:EmailExpression:PhotoURLExpression:ErrorMessageExpression:ErrorCodeAction:Login(category: Authentication provider)Facebook loginAction:Connect Facebook
  1. Action:Login (category: Authentication provider)

  2. Callback

    • Success : Condition:On login

      • Expression:UserID, an unique user ID
      • Expression:Provider
      • Expression:DisplayName
      • Expression:UserIDFromProvide
      • Expression:AccessToken
      • Expression:Email
      • Expression:PhotoURL
    • Failed : Condition:On login error

      • Error : Expression:ErrorMessage, Expression:ErrorCode (reference)

Condition:Is login, returns true if logging in.

Login with access token
  1. Facebook login

  2. Action:Connect Facebook

    • Assign parameter Access token if not using official facebook plugin.
  3. Callback

Logging out

CallbackCondition:On logged outAction:Logging out
  1. Action:Logging out
  2. Condition:On logged out

Authenticate Using Google Sign-In

Reference

Sample capx

See section of Authenticate Using Facebook Login.


Authenticate Using GitHub

Reference

See section of Authenticate Using Facebook Login.


Authenticate Using Twitter

Reference

See section of Authenticate Using Facebook Login.


Authenticate with Firebase Anonymously

Reference

Login

CallbackYesNoActionis successCondition:On loginCondition:On login errorUserID Expression:UserID----Expression:ProviderExpression:DisplayNameExpression:UserIDFromProvideExpression:AccessTokenExpression:EmailExpression:PhotoURLExpression:ErrorMessageExpression:ErrorCodeAction:Login(category: Anonymous)
  1. Action:Login (category: Anonymous)

  2. Callback

    • Success : Condition:On login

      • Expression:UserID, an unique user ID
      • Expression:Provider
      • Expression:DisplayName
      • Expression:UserIDFromProvide
      • Expression:AccessToken
      • Expression:Email
      • Expression:PhotoURL
      • Every anonymous login will create a new account
    • Failed : Condition:On login error

      • Error : Expression:ErrorMessage, Expression:ErrorCode (reference)

Condition:Is login, returns true if logging in.

ondition:Is anonymous, returns true after anonymous login.


Authentication by authentication token

Reference

CallbackYesNoActionis successCondition:On loginCondition:On login errorUserID Expression:UserID----Expression:ProviderExpression:DisplayNameExpression:UserIDFromProvideExpression:AccessTokenExpression:EmailExpression:PhotoURLExpression:ErrorMessageExpression:ErrorCodeAction:Login(category: Authentication token)

Login

  1. Action:Login (category: Authentication token)

  2. Callback

    • Success : Condition:On login

      • Expression:UserID, an unique user ID
      • Expression:Provider
      • Expression:DisplayName
      • Expression:UserIDFromProvide
      • Expression:AccessToken
      • Expression:Email
      • Expression:PhotoURL
      • Every anonymous login will create a new account
    • Failed : Condition:On login error

      • Error : Expression:ErrorMessage, Expression:ErrorCode (reference)

Condition:Is login, returns true if logging in.


Link multiple auth providers to an account

Reference

CallbackYesNoActionis successCondition:On link successCondition:On link errorExpression:ErrorMessageExpression:ErrorCode1. Login firebase2. Login facebook3. Action:Link to facebook2. Login google3. Action:Link to google2. Action:Link to email-password

Login or logged out by other app

Reference

Once a user authenticates to your app, Firebase manages their session, ensuring that the user is remembered across browser or application restarts.


Debug panel

UserID, display name, email, photo URL of current user will be shown at debug panel.