This is a demo project with use of AngularFire to Authenticate Firebase User with different methods provided by Firebase.
This project was built using AngularFire.
- To run the project
npm install
- Create a Firebase project
- Add config object from Firebase Webapp in to /src/app/services/firebase/firebase-config.ts
var config = {
apiKey: '',
authDomain: '',
databaseURL: '',
projectId: '',
storageBucket: '',
messagingSenderId: ''
};
-
Create Android and ios platform from firebase project setting
-
Download google-service.json and googleService-info.plist file and add both file project root folder.
-
Enable google authentication and get web_client id. [ web_client id used in social-auth.service(firebase-auth/Repo/src/app/services/social-auth/social-auth.service.ts) ]
-
Integrate google plugin
- ionic cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID=myreversedclientid --variable WEB_APPLICATION_CLIENT_ID=mywebapplicationclientid
-
Create facebook app using facebook devloper account.
-
Add android and ios platform on facebook app.
-
Enable facebook authentication and set facebook app id and secrate key.
-
Integrate facebook plugin
- ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
- Enable phone number authentication
- Android Platform
-
Add google-service.json file path : platforms/android/app/google-services.json
-
Add following plugins
- ionic cordova plugin add cordova-plugin-androidx
- ionic cordova plugin add cordova-plugin-androidx-adapter
- IOS Platform : => Add GoogleService-info.plist in Xcode Path : MyApp/resources/GoogleService-info.plist
- Add Authentication with Email and Password
- Add Authentication with Facebook
- Add Authentication with Google
- Add Authentication with Phone number
- Add Authentication with Twitter