Flutter Firebase Auth - The Cleanest & Fastest Way - IOS & Android

Поделиться
HTML-код
  • Опубликовано: 3 авг 2024
  • This is how to authenticate IOS and Android Users with Flutter and Firebase. All the steps to connect your Flutter Firebase Auth App are in the description. This is the most simple, cleanest and fastest way to connect your Flutter App to Firebase Authentication. Make sure to follow every step correctly and at the end you will have an authentication with Firebase and Flutter for IOS and Android devices. Also, we don't use any state management for this example, because we want to use only Firebase packages. We start by installing the dependencies (Firebase auth and Firebase Core), then we connect the Flutter application to Firebase for IOS and Android. To finish, we code step by step the Flutter and Firebase Authentication app in 5 simples steps. Firebase authentication is one of the simplest way to authenticate users in your application. This video was create with the goal of explaining Firebase authentication with flutter in 10 minutes. If you would like a flutter tutorial about firebase authentication less in less than 10 minutes, comment down bellow.
    COURSES
    Flutter courses (Beginner & Advanced): fluttermapp.com/
    OVERVIEW
    0:00​ Flutter Firebase Auth
    0:10 Step 1. Add dependencies
    0:21 Step 2.1 Create a Firebase Project
    0:40 Step 2.2 Activate Email Sign In
    0:59 Step 2.3 Connect the Android App
    3:09 Step 2.4 Connect the IOS App
    3:50 Step 3 Let's Code (create files)
    4:05 Step 3.1 Auth
    4:58 Step 3.2 Home Page
    5:53 Step 3.3 Login and Register Page
    8:40 Step 3.4 Widget Tree
    9:18 Step 3.5 Main (You must add this*)
    MISSION
    Our mission at Flutter Mapp (Flutter Mobile App) is to help purpose driven Flutter developers go full-time doing what they love and making an impact through coding. We achieve this with useful Flutter tips and straight to the point Flutter videos.
    RECOMMENDED VIDEOS
    Playlist of more than 200 Flutter tips: • 35 Flutter Tips That W...
    Learn Flutter in 1 hour: • Flutter Tutorial For B...
    Zero to Hero Flutter Course (Beginners): • Video
    Hero to Pro Flutter Course (Advanced): • Video
    EDITOR
    Amaan Ansari: / amaan_0605
    SOCIAL MEDIA:
    Instagram : fluttermapp
    Twitter : FlutterMapp
    Website: www.fluttermapp.com
    Discord Invite: / discord
    CONTACT
    For business inquiries email me here: info@fluttermapp.com
    Website: fluttermapp.com
    #FlutterMapp
    #Flutter

Комментарии • 131

  • @zawar92
    @zawar92 2 года назад +4

    Clean and fast steps. Easy to adapt this with a state management library.

  • @gloranger2001
    @gloranger2001 4 месяца назад +2

    Are you kidding me? Talk about straight to the point! I wish all instructions were this concise! Greta job my friend!!!

    • @FlutterMapp
      @FlutterMapp  4 месяца назад

      Thank you very much! It's the main reason why this channel was created in the first place. The worst is when they start like this: "Hi guys, my name is "who cares", subscribe, turn on the belt, bla bla bla" ... Glad you like it. 👍

  • @dinoelef
    @dinoelef Год назад

    Thank you! for those trying, make sure Dependencies are on the latest versions

  • @belespritmkhatshwa3145
    @belespritmkhatshwa3145 9 месяцев назад +2

    Thank you so much.
    Just a note for everyone trying this tutorial out in 2023. It may show an exception when you run the app - the exception points to "host" which is Firebase. This happens because the setup for dependencies and plugins in your build gradle are probably the latest versions. Use older versions and the code runs perfectly.

    • @FlutterMapp
      @FlutterMapp  9 месяцев назад +1

      Thanks for the info! I will do an update at some point.

    • @techplanet001
      @techplanet001 2 месяца назад

      Please what version do you recommend

  • @monkeygames1771
    @monkeygames1771 Год назад +1

    Absolutely killed it, clear and fast, love it! Forgot email confirmation

  • @huynhucbui9849
    @huynhucbui9849 Год назад

    Hi Sir, thank you for great tutorial.
    I have a question, should we declare Auth object outside of Build method to avoid creating multiple objects ?

  • @vaibhavacharya7507
    @vaibhavacharya7507 Год назад +1

    The best way of explaining..
    & Thank you for putting source code link for reference

  • @TechBuddy_
    @TechBuddy_ 2 года назад +19

    Amazing video as always, but I have three things that I'd have done differently
    1. I'd use actual forms to create forms and validation ( there is amazing documentation about this on flutter docs )
    2. Use the firebase CLI that is sooo much faster to setup and kinda easy to maintain as well
    3. Check for loading and error states in the stream builder along with the hasData check

    • @FlutterMapp
      @FlutterMapp  2 года назад +7

      Very valuable comment 👏🎉🎉 Thanks you for sharing! A video about CLI will come 👏. (With error states in the stream builder)

    • @tanthokg
      @tanthokg Год назад

      Can I ask what version you use? I download the standalone version but whenever I try to execute it, it keeps saying '' is not recognized as an internal or external command, operable program or batch file. But every tutorial I saw on youtube use the same standalone version and nothing goes wrong. Do I need to put that .exe file into any specific folder, or I can put it anywhere?

    • @monkeygames1771
      @monkeygames1771 Год назад

      flutter has shit documentation for begginers, dont go there

    • @codecret1
      @codecret1 Год назад

      do u have a code

    • @TechBuddy_
      @TechBuddy_ Год назад

      @@codecret1 for what ?

  • @SudipBhattacharyya
    @SudipBhattacharyya Год назад +2

    Phew!!! What a mind blowing video!!! Nobody taught me authentication in this way!!! THANKS! 🙂

  • @nunosilva2658
    @nunosilva2658 Год назад +1

    Great tutorial, however how could we do something similar but using Flutter's native routes (Navigator 2.0)?

  • @gofry3023
    @gofry3023 Год назад +9

    This tutorial is more than a tutorial, we call it a masterpiece!

  • @RianY2K
    @RianY2K 2 года назад

    Hope more tutorial about this. especially with CRUD data and todo list app.

  • @vaibhavkhanna9412
    @vaibhavkhanna9412 Год назад +1

    This is a great video, and I am thankful for it, thank you very much

  • @dhmsimons
    @dhmsimons 2 года назад +1

    please do a video about Flutter - Firebase Analytics. Thank you!

  • @jake4524
    @jake4524 Год назад +3

    I thought i followed the whole thing correctly, however when i press register, it tells me the email adress is badly formatted. Any idea what i did wrong?

  • @captcha1337
    @captcha1337 Год назад

    Thank you for such video!
    Most helpful i found so far.

  • @nasserdiallo8636
    @nasserdiallo8636 Год назад +3

    man... this tutorial is super awesome !!

  • @MrCamdere
    @MrCamdere 2 года назад +1

    I love your Videos is so easy to understand

  • @chadj1797
    @chadj1797 Год назад

    Thank you, you're a life saver!

  • @ahmadxrizvi
    @ahmadxrizvi 2 года назад +1

    Thanks a lot brotha 🥺❤️

  • @karolwisniewski8546
    @karolwisniewski8546 Год назад +1

    How to figure out error in xCode: Module 'firebase_auth' not found. It happen every time I create a new project and add this line of code:
    firebase_core: ^2.13.1
    firebase_auth: ^4.6.2
    to the pubspec.yaml
    the error shows even dont use firebase_auth in the code also if firebase_auth is in diffrent version

  • @JeffPalmer42
    @JeffPalmer42 2 года назад +14

    Finally, one that makes sense

    • @azmainjawad6771
      @azmainjawad6771 Год назад

      i KNOW right?

    • @rxtechandtrading
      @rxtechandtrading Год назад

      yeah to bad hes missing tons of stuff in his vid..People are getting alot of errors since his dependancies in the pubspec.yaml file are missing a few packages and he didnt show how to get the authentication keys when connecting the android and ios versions of the app to firebase..but i get ur to ignorant or dumb to realize this untill ur app crashes

    • @javachipjade
      @javachipjade Год назад

      @@rxtechandtrading what should we add? not a single tutorial works for me

    • @rxtechandtrading
      @rxtechandtrading Год назад

      @@javachipjade flutter cli

    • @javachipjade
      @javachipjade Год назад

      @@rxtechandtrading ok i get you now

  • @taneshasimeon2202
    @taneshasimeon2202 Год назад

    absolutely love and prefer your videos!

  • @darul-asar381
    @darul-asar381 2 года назад

    As always 🔥🔥🔥

  • @sportsfever4116
    @sportsfever4116 Год назад

    Sir please guide me. I used the same method and upon restart the logged in user i directed to homescreen but when i delete a user(not from in app but firebase portal) and then restart the app the user(deleted) still remained logged in evern he is deleted from authentication portion by me.what to do to redirect him after he is deleted. thanks

  • @dinhtiendat2611
    @dinhtiendat2611 Год назад

    This video teach me how i can make my code look more cleaner

  • @Andrew-px9fj
    @Andrew-px9fj Год назад

    Does anyone know if there is a recommended way of doing auth with a custum api with token bearer, Im doing in in provider and save the token in both shared prefs and the provider itself but it seems so scuffed to be... besides i need to get the token every time i want to make a request... isnt there something like Axios for requests? ive seen axios package but doesnt look very popular/trustworthy is there any comparable package that saves token to every request automatically?

  • @k415hu7
    @k415hu7 2 года назад +2

    Please make a video on how to use firebase database in flutter

  • @salahshakeel2778
    @salahshakeel2778 2 года назад

    Make video on facebook authentication firebase. I know its NoSql Firebase but can we make relation database by our side and how to use aggregate functions!

  • @kennyevl1550
    @kennyevl1550 11 месяцев назад +1

    i did everything and when i run the code the screen is just White

  • @mohamedabdelrehem7698
    @mohamedabdelrehem7698 2 года назад

    i was waiting for this video like forever ♥♥♥

  • @mohamedAli-cb3ep
    @mohamedAli-cb3ep 2 года назад +1

    Amazing and clear video🔥🔥 can you add google sign in and Google signup

    • @FlutterMapp
      @FlutterMapp  2 года назад

      We have already done Google sign in on this channel if you need it 🔥🔥🔥

  • @sanmedia405
    @sanmedia405 2 года назад

    Can you do firebase auth with bloc patter with admin and user features...

  • @user-kt7xr2mh1n
    @user-kt7xr2mh1n 8 месяцев назад

    And if i have Clean arhitecture in my app, how can i integrated?

  • @wanadi406
    @wanadi406 Год назад

    Thank you so much, it helped me alot

  • @emwagner
    @emwagner 9 месяцев назад

    What if youre using Windows and VS Code to set up for iOS?

  • @ElectricBlanket1122
    @ElectricBlanket1122 Год назад

    Is there a project folder containing this code that I can use? Please link

  • @franciscojavier8968
    @franciscojavier8968 2 года назад

    I hope you are not forgetting about firebase ui package and the pre build login page

    • @FlutterMapp
      @FlutterMapp  2 года назад +2

      We will do this one also 🔥🔥

  • @amaanansari5835
    @amaanansari5835 2 года назад +1

    Awesome 🔥🔥🔥

  • @harsha4048
    @harsha4048 Год назад

    It doesn't perform login when I clicked login button but after I restart ide, it is logged into the homepage Please help me to figure it out ❤

  • @redd1491
    @redd1491 Год назад

    does the inputed email and password recorded into the firebase cloud?

  • @madesetiawan
    @madesetiawan 2 года назад

    Thanks for your tutorial, can you add a class for forget password ?.

  • @xr.spedtech
    @xr.spedtech 2 года назад

    I more or less prefer back end stuff ...
    UI Fields and such ...
    I prioritize it last ...
    Bad Strategy ?

    • @TechBuddy_
      @TechBuddy_ 2 года назад +1

      Your app your rules

  • @fluttermakers
    @fluttermakers Год назад

    very good tutorial

  • @khvlog14
    @khvlog14 2 года назад

    Thanks Sir

  • @lokabow1032
    @lokabow1032 2 года назад +2

    If you could do a video of connecting asp.Net web api with flutter

  • @piffyization
    @piffyization 2 года назад

    Excellent! now with firebase messaging please! :(

  • @farouk_bloncko
    @farouk_bloncko 7 месяцев назад

    what version of firebase core works with firebase auth ^4.3.0?

  • @rushikesh_bagul
    @rushikesh_bagul Год назад +1

    source code link is not working can you please give me a github link

  • @enemiduks
    @enemiduks Год назад

    Thanks, this really help

  • @letmeflutter6644
    @letmeflutter6644 Год назад

    Thank you

  • @hemrajprajapati1877
    @hemrajprajapati1877 Год назад

    how same code work with flutter web .kindly explain

  • @m1kezulu
    @m1kezulu 2 месяца назад

    very nice auth

  • @ABHISHEK-jc8kn
    @ABHISHEK-jc8kn 2 года назад +2

    How about using a simple flutterfire command instead of all that setup mess?

    • @FlutterMapp
      @FlutterMapp  2 года назад

      Agreed, we will do a video about it also pretty soon💪

    • @ABHISHEK-jc8kn
      @ABHISHEK-jc8kn 2 года назад

      @@FlutterMapp great. Watched your videos after a long time. They have been even better. Watching all the ones i had missed one by one xd

    • @FlutterMapp
      @FlutterMapp  2 года назад

      @@ABHISHEK-jc8kn 😂😂😂 The widgets series? or other videos?

    • @ABHISHEK-jc8kn
      @ABHISHEK-jc8kn 2 года назад

      @@FlutterMapp widget series just completed. Watching dart tips now

  • @krishnapra123
    @krishnapra123 Год назад

    Do we have a method in firebase to create a User ID without an email address or phone number? I mean super admin has the ability to assign a custom user ID and a default password to later reset it (e.g. user ID: ABCD1234 PWD: 12345).

  • @amsihavibes
    @amsihavibes Год назад +1

    Source code is not available

  • @Way_Of_The_Light
    @Way_Of_The_Light 2 года назад

    I soo badly needed this tutorial 🙏, can you make a video for 'Apple Sign In' via firebase?

  • @RahulNC-fo9lv
    @RahulNC-fo9lv Год назад

    I followed all the steps that you showed in the video, project is running, I tried to login with some random mail and password like you did in the video, but it is throwing an error. I'm running my project in chrome.

  • @devsda1
    @devsda1 Год назад

    There is an option to connect Flutter, why did you do Android and iOS separately?

    • @FlutterMapp
      @FlutterMapp  Год назад +1

      We will do the other option soon also 🔥🔥

  • @dfnchx
    @dfnchx Год назад

    I can'tget this code runs in VSC Flutter, always get an error, am stuck 5 days already, I have tried everything that is available in internet but nothing works.

  • @itpeople1573
    @itpeople1573 Год назад

    amazing thanks

  • @ihsanalalawi4871
    @ihsanalalawi4871 Год назад

    you should have added the main at the beginning not the end.
    i wasted so much time looking for these 2 lines of code before seeing it at the end of the video

  • @KamranKhan-jg1md
    @KamranKhan-jg1md 2 года назад +1

    flutterfire cli is best for connecting flutter app with firebase.

    • @FlutterMapp
      @FlutterMapp  2 года назад

      Its the next one on the list 🔥🔥🔥

  • @user-cc3qf2mg8h
    @user-cc3qf2mg8h 3 месяца назад

    Easy 🎉 tnks

  • @amsihavibes
    @amsihavibes Год назад +2

    Can you send me source code link

  • @jayswalviraj4528
    @jayswalviraj4528 2 года назад

    Have you any idea? How to run xcode without macOs?

    • @FlutterMapp
      @FlutterMapp  2 года назад

      You can rent a MacOS machine maybe on internet 🤨🤨 Im not sure how the authorization will work tho...

  • @kevink398
    @kevink398 10 месяцев назад

    It worked but I'm not sure how to navigate to the next screen when the user logs in. I used the code below before implementing the Firebase Auth.
    Navigator.push(
    context,
    MaterialPageRoute(
    builder: (context) => const FrontPage()));

  • @beedoner2106
    @beedoner2106 Год назад +1

    the code link is dead can you update it please ?

    • @FlutterMapp
      @FlutterMapp  Год назад +1

      Well... I dont have it anymore lol, my bad, have a good day 🎉

    • @honkpillado
      @honkpillado Год назад

      @@FlutterMapp HAHAHAHAHA

  • @xavisean
    @xavisean Год назад

    best video

  • @mm-sf6qx
    @mm-sf6qx 2 года назад +1

    source code plz

  • @zulfayhaji8535
    @zulfayhaji8535 3 месяца назад

    this one is better

  • @casbot71
    @casbot71 2 года назад

    *ask "WTF is flutter and firebase?" as this pops up in my suggested …

  • @usertuserb7057
    @usertuserb7057 Год назад

    lease ,
    when I run flutterfire configure
    i get this error message
    Could not find bin\flutterfire.dart in package flutterfire_cli.
    any suggestion please?

  • @legendali2096
    @legendali2096 Год назад

    Plz give me source code the link hot working

  • @s-std
    @s-std Год назад

    U haven't tested the code !

    • @ndasss9563
      @ndasss9563 Год назад

      he did... its in 0:00 xd

    • @user-x649
      @user-x649 Год назад +2

      @@ndasss9563 I meant a good test but the one he did is fake ! A test means to test every functionality he showed in the video not execute the app that he has already tested before making the video. 1/ If you have some knowledge in IT you shouldn't have replied that way 2/ always put in your mind that new programmers or even students could see the video, so he has to make the life easy for them by testing every functionality separately

  • @prod.goldenstar273
    @prod.goldenstar273 Год назад

    5:20

  • @user-tm8eu1qm1t
    @user-tm8eu1qm1t Год назад

    9:05

  • @Cube-lt8ih
    @Cube-lt8ih 2 года назад

    Where is the source code? I need it!

    • @DanFlorio
      @DanFlorio Год назад +1

      Try GitHub CoPilot. I only needed to type about 20% of the code to recreate this project.

  • @user-xm9hg8nm7b
    @user-xm9hg8nm7b Год назад +1

    the code on the addfirebase SDK is different now in the first step it says To make the google-services.json config values accessible to Firebase SDKs, you need the Google services Gradle plugin.
    Kotlin DSL (build.gradle.kts)
    Groovy (build.gradle) and I can't find that specific line inside the gradle folder any help would be really appreciated.Thanks in advance

  • @limkangwei6339
    @limkangwei6339 Год назад +1

    I kept on having this error. After typing the email and password, and when I click on the register button/log in button, nothing happens.
    W/System ( 9647): Ignoring header X-Firebase-Locale because its value was null.
    D/TrafficStats( 9647): tagSocket(137) with statsTag=0xffffffff, statsUid=-1

    • @FlutterMapp
      @FlutterMapp  Год назад

      Sorry I have never see this before..

    • @usmanxsaeed
      @usmanxsaeed Год назад

      do you have any solution to fix this?

  • @abdorizak
    @abdorizak 2 года назад

    it's best practice to use com.example.project instead of that use com.your_name.your_project_name.

    • @FlutterMapp
      @FlutterMapp  2 года назад +1

      com.example.project is just for an example. When you create your own project its 100% better to do com.your_name.your_project_name. 👏

  • @Hasinnnnn
    @Hasinnnnn Год назад

    You can use the signOut() method to log a user out. There is no need to create a separate method for signing out because it’s just a single line of code : FirebaseAuth.instance.signOut();

  • @vaibhavkhanna9412
    @vaibhavkhanna9412 Год назад

    plugins {
    id 'com.android.application'
    // Add the Google services Gradle plugin
    id 'com.google.gms.google-services'
    ...
    }
    please help its showing this in case of plugins how to fix it

  • @noeb4463
    @noeb4463 6 месяцев назад

    Target of URI doesn't exist: 'package:firebase_auth_project/auth.dart'. Why ??? Tank's 🙏

    • @nah2341
      @nah2341 3 месяца назад

      quite late, replace firebase_auth_project with your project folder name.

  • @jemjemvermillion3309
    @jemjemvermillion3309 Год назад +1

    I got this Error
    Error: Member not found: 'FirebaseAppPlatform.verifyExtends'.
    firebase_app.dart:18
    FirebaseAppPlatform.verifyExtends(_delegate);
    ^^^^^^^^^^^^^
    Do u know what went wrong?

    • @4meters
      @4meters 11 месяцев назад

      Execute in project main folder: flutter pub upgrade --major-versions
      It should fix it