Skip to content

RavindraChherke/titanium-firebase-auth

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Firebase Auth - Titanium Module

Use the native Firebase SDK in Axway Titanium. This repository is part of the Titanium Firebase project.

Requirements

  • The Firebase Core module
  • iOS: Titanium SDK 6.3.0+
  • Android: Titanium SDK 7.0.0+

⚠️ Android Note

The Android version of this module is currently in development and should not be used in production so far!

ToDo's

  • Android: Remove firebase-common-11.0.4.aar and play-services-tasks-11.0.4.aar from the build after building because they are part of Ti.PlayServices and Titanium-Firebase-Core already and will likely cause duplicate depencency errors!
  • Expose all iOS API's to Android

Download

API's

FirebaseAuth

Methods (Arguments TBA)

fetchProviders(parameters) (Dictionary)
createUserWithEmail(parameters) (Dictionary)
signInWithEmail(parameters) (Dictionary)
signOut(parameters) (Dictionary)
signInWithCredential(parameters) (Dictionary)
createCredential(parameters) (Dictionary)
signInAnonymously(parameters) (Dictionary)
signInAndRetrieveDataWithCredential(parameters) (Dictionary, iOS-only)
signInWithCustomToken(parameters) (Dictionary, iOS-only)
sendPasswordResetWithEmail(parameters) (Dictionary, iOS-only)
confirmPasswordResetWithCode(parameters) (Dictionary, iOS-only)
checkActionCode(parameters) (Dictionary, iOS-only)
verifyPasswordResetCode(parameters) (Dictionary, iOS-only)
applyActionCode(parameters) (Dictionary, iOS-only)
addAuthStateDidChangeListener(callback) (Function, iOS-only)
removeAuthStateDidChangeListener() (iOS-only)
addIDTokenDidChangeListener(callback) (Function, iOS-only)
removeIDTokenDidChangeListener() (iOS-only)
fetchIDToken(forceRefresh, callback) (Boolean, Function, Android-only)

Properties

currentUser (Dictionary, get)
languageCode (String, get, iOS-only)
apnsToken (Ti.Blob, get, iOS-only)
  • For Android, use fetchIDToken(forceRefresh, callback)

FirebaseAuth.AuthCredential

Virtual Type to be used in ``signInWithCredential. Create with createCredential(parameters)`.

Example

// Require the Firebase Auth module
var FirebaseAuth = require('firebase.auth');

FirebaseAuth.signInWithEmail({
  email: '[email protected]',
  password: 't1r0ck$!',
  callback: function(e) {
    if (!e.success) {
      Ti.API.error('Error: ' + e.error);
      return;
    }

    Ti.API.info('Success!');
    Ti.API.info(e.user);
  }
});

// More TBA

Build

cd ios
appc ti build -p ios --build-only

Legal

This module is Copyright (c) 2017-Present by Appcelerator, Inc. All Rights Reserved. Usage of this module is subject to the Terms of Service agreement with Appcelerator, Inc.

About

Use the Firebase Autentication SDK in Axway Titanium πŸš€

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 86.7%
  • Java 7.3%
  • Python 5.8%
  • JavaScript 0.2%