Use the native Firebase SDK in Axway Titanium. This repository is part of the Titanium Firebase project.
The whole Firebase support in Titanium is developed and maintained by the community (@hansemannn
and @m1ga
). To keep
this project maintained and be able to use the latest Firebase SDK's, please see the "Sponsor" button of this repository,
thank you!
- The Firebase Core module (iOS only)
- iOS: Titanium SDK 10.0.0+
- Android: Titanium SDK 9.0.0+
- For Android, use
fetchIDToken(forceRefresh, callback)
Virtual Type to be used in signInWithCredential
. Create with createCredential(parameters)
.
// Require the Firebase Auth module
var FirebaseAuth = require('firebase.auth');
// Sign-up
FirebaseAuth.createUserWithEmail({
email: '[email protected]',
password: 't1r0ck$!',
callback: function(e) {
if (!e.success) {
Ti.API.error('Create: error: ' + JSON.stringify(e));
return;
}
Ti.API.info('Create: success!');
Ti.API.info(JSON.stringify(e.user));
}
});
// Login
FirebaseAuth.signInWithEmail({
email: '[email protected]',
password: 't1r0ck$!',
callback: function(e) {
if (!e.success) {
Ti.API.error('Error: ' + JSON.stringify(e));
return;
}
Ti.API.info('Success!');
Ti.API.info(JSON.stringify(e.user)); // e.g. {"uid":"...","photoURL":null,"phoneNumber":null,"email":"...","providerID":"...","displayName":null}
}
});
cd ios
appc ti build -p ios --build-only
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.