-
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.jsonfile from your Android app c. Get your SHA1 Certificate fingerprint by running the following in your terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { | |
| Auth, authState, createUserWithEmailAndPassword, GoogleAuthProvider, OAuthCredential, | |
| signInWithCredential, signInWithEmailAndPassword, signInWithPopup, signOut | |
| } from '@angular/fire/auth'; | |
| import { FirebaseAuthentication } from '@capacitor-firebase/authentication'; | |
| import { Capacitor } from '@capacitor/core'; | |
| import { AlertController, LoadingController } from '@ionic/angular'; | |
| import { switchMap } from 'rxjs/operators'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { getDownloadURL, ref, Storage, StringFormat, uploadBytes, uploadString } from '@angular/fire/storage'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class UploadService { | |
| constructor( | |
| private storage: Storage, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { User } from '@angular/fire/auth'; | |
| import { BehaviorSubject } from 'rxjs'; | |
| import { take } from 'rxjs/operators'; | |
| import { AppUser } from '../models/user.model'; | |
| import { DbService } from './db.service'; | |
| @Injectable({ | |
| providedIn: 'root' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { | |
| addDoc, collection, collectionData, CollectionReference, | |
| deleteDoc, doc, docData, DocumentData, DocumentReference, | |
| Firestore, query, QueryConstraint, setDoc, updateDoc | |
| } from '@angular/fire/firestore'; | |
| import { Observable } from 'rxjs'; | |
| @Injectable({ | |
| providedIn: 'root' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const tailwindColors = require('tailwindcss/colors'); | |
| const ionicColors = Object.assign(tailwindColors, { | |
| primary: { | |
| default: 'var(--ion-color-primary)', | |
| shade: 'var(--ion-color-primary-shade)', | |
| tint: 'var(--ion-color-primary-tint)', | |
| }, | |
| secondary: { | |
| default: 'var(--ion-color-secondary)', | |
| shade: 'var(--ion-color-secondary-shade)', |