This is a demo project with use of Firebase js sdk to authenticate firebase user with different methods provided by firebase.
This project was built using Capacitor Firebase Authenthentication and Firebase JS SDK.
- To run project
npm install
- Create a Firebase project
- Use this link to create project in Firebase.
- Add config object from Firebase Webapp in to /src/app/services/firebase/firebase-config.ts
export const firebaseConfig = {
apiKey: "xxxxxxxx-xxxxxxxx",
authDomain: "xxxxxxxxxxxxxxxxxxxxxxxx",
databaseURL: "xxxxxxxxxxxxxxxxxxxxxxxx",
projectId: "xxxxxxxx",
storageBucket: "xxxxxxxx",
messagingSenderId: "xxxxxx",
appId: "xxxxx",
measurementId: "xxxxxxxxxxxxxxxx"
};
- Before configure Google and Facebook. Change app id in capacitor.config.ts file.
- Create Android and iOS application in firebase project setting with your app id.
- Download GoogleService-Info.plist file for iOS app and add that file under ios/App/App folder.
- Download google-services.json file for Android app and add this file under /android/app folder.
- Enable google authentication in firebase authentication provider.
- Follow step mention in below link for configure google authentication.
- Configure Google Authentication in Android, iOS and Web
- Create facebook app using facebook developer account.
- Add Android, iOS and web platform on facebook app.
- Enable facebook authentication and set facebook app id and secrate key.
- Enable google authentication in firebase authentication provider.
- Follow step mention in below link for configure google authentication.
- Configure Facebook Authentication in Android, iOS and Web
- Enable twitter authentication provider.
- Follow this steps before you begin