-
Create a project at https://firebase.google.com/
-
Add iOS, Android and Web apps
-
Download the config files for each of your apps: a. Copy the configuration object for the web app b. Download the
google-services.json
file from your Android app c. Get your SHA1 Certificate fingerprint by running the following in your terminalkeytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
and copying the SHA1 result (more info here: https://developers.google.com/android/guides/client-auth) c. Download theGoogleService-info.plist
from your iOS app -
Enable Firebase Authentication sign in methods for
email
andGoogle
-
Enable Firestore Database
-
Enable Firebase Storage
-
Make sure you have the Capacitor VSCode Extension installed and updated
-
Create a new ionic capacitor project
-
Globally replace
io.ionic.starter
with your apps reverse domain name (the one specified when creating your Firebase project) -
Add an iOS project a. Add your
GoogleService-info.plist
to the ios/App/App directory -
Add an Android project a. Add your
google-services.json
to the android/app directory
-
Follow installation steps for
@capacitor-firebase/authentication
- Haptics Plugin for vibrations : https://capacitorjs.com/docs/apis/haptics
- Splash Screen Plugin for granular splash screen control : https://capacitorjs.com/docs/apis/splash-screen
- Camera Plugin for uploading images from cameral or cameral roll or file system: https://capacitorjs.com/docs/apis/camera
-
Run
ng add @angular/fire
and follow the instructions. -
Choose the Firebase project you created
-
Add the following: a. Firestore b. Authentication c. Storage
-
Update your
app.module.ts
to initialize Firebase authentication in the following manner:provideAuth(() => { if (Capacitor.isNativePlatform()) { return initializeAuth(getApp(), { persistence: indexedDBLocalPersistence }); } else { return getAuth(); } }),
-
Firestore Service: https://gist.github.com/reyco1/46417f5fce787ed4135b6ba315fa0831
-
User Service: https://gist.github.com/reyco1/cedbf994587c9dfa5511112edcfa1197
-
Upload Service: https://gist.github.com/reyco1/13329485a4966a3e479382388c5b83b1
-
Auth Service : https://gist.github.com/reyco1/e4f8747289efd9c981c3babb2be4218e
-
Make sure you have the Tailwind CSS IntelliSense Extension installed in VSCode
-
In the command line in your project, do:
ng add ngx-tailwind
and follow the instructions -
Use this Gist to include your ionic color pallet in Tailwind https://gist.github.com/reyco1/10b1d390b5f3f214c1a30072f316437a