Screen.Recording.2022-06-06.at.12.48.50.mov
Web project live :
https://fireauthtut-e1deb.web.app/
This repository is for whole flutter community that his main issue based on flutter authentication with FIREBASE. in adittion using in google and facebook auth front of firebase.
This project use flutter 3!!
Support platforms
- Android
- Iphone
- Web
- MacOs
- Windows
- Linux
dont have windows or linux so i could't test it, i think it will work pls notify if someone want to try.
This is the docs:
pls read it carefully!!
https://firebase.google.com/docs/flutter/setup?platform=web
State mangement Library https://pub.dev/packages/flutter_bloc
Nice adittion to give more power to bloc (rxDart + bloc = bff ❤️)
https://pub.dev/packages/rxdart
For di (dependency injection)
https://pub.dev/packages/get_it
Navigation
https://pub.dev/packages/get_it
envioremnt variables file
in this porject his path:
root_project/assets/variables/dotenv
https://pub.dev/packages/flutter_dotenv
https://pub.dev/packages/flutter_facebook_auth
https://pub.dev/packages/google_sign_in
(recommend to read the docs before , this expknation will be short)
-
Create project in firebase open cmd/terminal
-
run
firebase login
-
run
dart pub global activate flutterfire_cli
-
run
flutterfire configure
(if not found error run this at the terminal"export PATH="$PATH":"$HOME/.pub-cache/bin"
) -
Choose your project and platforms you want.
-
Wait untill finish and look that
firebase_options.dart
genereated -
Go to
Authentication
-> sign in method enable email password,google,facebook -
Generate facebook client id and token id -> https://facebook.meedu.app/docs/4.x.x/intro
-
After generate facebook_client_id and token_id copy them to :
a. dotenv file in name
facebook_app_id
path -> (root_project/assets/variables/dotenv
)b. go to
strings.xml
and past them in the right placesc. go to info
ios/runner/Info.plist
and past them in the right places -
Google sign add
GoogleService-Info.plist
to ios project(from firebase porject settings) -
copy from
GoogleService-Info.plist
theREVERSED_CLIENT_ID
and past it insideios/runner/Info.plist
-
Run and enjoy
-
M1 macs for ios or macOs app pod install not working try run in the cmd
a.
sudo arch -x86_64 gem install ffi
b.
arch -x86_64 pod install
-
Display image in web
CORS
error, solution :a. install brew
b. run
brew install --cask google-cloud-sdk
c. run
gsutil cors set cors.json gs://{your_bucket_name}