Great stuff! Very helpful. Is there any way you can do a tutorial on OneSignal Push Notifications for iOS? I cant seem to get iOS working no matter what. thanks
@@velicanevli If you want to save information like phone number, surname, etc. You will need to create a profile document in a database like Cloud Firestore or Realtime Database. The profile document can have a UserId property that will hold the user Uid. When you create a user with email and password, you also add a new profile document in the database. When a user connects, you can fetch his profile by Uid in the database. In the link below, you will find a NuGet package to interact with Firestore : github.com/f-miyu/Plugin.CloudFirestore
In Firebase : Register an Android App. You will get a file named "google-services.json". In Visual Studio, in the Android project : add the following packages "Xamarin.Firebase.Auth" and "Xamarin.Firebase.Core". add the "google-services.json" file, set the build action to "GoogleServicesJson", you will need to edit the project file (.csproj) like below ItemGroup> In the main activity file, before the "LoadApplication" method, initialize Firebase. FirebaseApp.InitializeApp(Application.Context) In the service implementation, the code is the same, except the way you access the Firebase current instance. iOS : Firebase.Auth.Auth.DefaultInstance android : Firebase.Auth.FirebaseAuth.Instance
@@TechWithPat Thank You so much! By the way, do you plan to make a video one day, but now have you implemented authentication for Google? Thanks again and excuse my English
@@TechWithPat Thank you very much, go perfect in iOS but in Android I am unable to compile without errors, so it's not just the "Firebase.Auth.FirebaseAuth.Instance", do you have the file to compare it? Thanks again I have already subscribed!
@@Activity247 I agree, I oversimplified. You can find the Android implementation in the following repository : github.com/estyval/XamarinFormsFirebaseAth/tree/add-android These are the versions of the nuget package used : Xamarin.Firebase.Auth : 71.1605.4 Xamarin.Firebase.Core : 71.1601.4
Hi there, first of all thanks for this great tutorial. Sadly I got an error and do not know any help even though I tried a lot. Probably you are able to help me: I got in the class Firabase Authentication in the Android Folder the following error: class FirebaseAuth.Firebase.Auth CS0433: The type 'FirebaseAuth' exist in both 'Firebase.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Xamarin.Firebase.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' I hope for your help.
@@TechWithPat thanks for ur help bro so far. I did managed it that it works. I ve got one more issue to solve. When I want to sign in a new user in the FirebaseAuthentication class. I get an error with the GetIdTokenAsync method: Error CS1061 'FirebaseUser' does not contain a definition for 'GetIdTokenAsync' and no accessible extension method 'GetIdTokenAsync' accepting a first argument of type 'FirebaseUser' could be found (are you missing a using directive or an assembly reference?) Do you have any Idea? By the way firebase contains a lot of stuff like documentations. Could you tell me which one you use? Because there is no exactly help for Xamarin. Only for unity and stuff or is this kind of similar?
There is no documentation for Xamarin, I looked at the code in the nuget package. If you still have troubles, clone the repo for this video, it works. github.com/estyval/XamarinFormsFirebaseAth/tree/add-android
Your are so fluent, do you have any .Net courses? Always learning alot from your tuts, thank you
I haven't thought about it yet but why not in the future.
Thanks
How to add authorization to it? I want admin to only access certain pages.
where is the base viewModel coming from?
The code is the same for Android?
how to implement this for a cross platform app (both android and ios)
How do u deal with roles such as admin user
How can we check if the email is already registered? How can we connect the authentication on our realtime database?
how to check if email already exist is signup function?
Firebase Authentication in Xamarin Forms, let me know what you think
Great stuff! Very helpful. Is there any way you can do a tutorial on OneSignal Push Notifications for iOS? I cant seem to get iOS working no matter what. thanks
@@gjhdigital Thanks for your comments, I will think about a OneSignal tutorial.
Hi bro thanks for video .I have a question . Other information of the login person, how do I hold it firebase database ?
@@velicanevli If you want to save information like phone number, surname, etc.
You will need to create a profile document in a database like Cloud Firestore or Realtime Database.
The profile document can have a UserId property that will hold the user Uid.
When you create a user with email and password, you also add a new profile document in the database.
When a user connects, you can fetch his profile by Uid in the database.
In the link below, you will find a NuGet package to interact with Firestore :
github.com/f-miyu/Plugin.CloudFirestore
@@TechWithPat thanks bro .I’ll try
can it be used with android? And if so, what should be changed?
how can be the same in Android ? and how can be the same in iOS via visual studio not xcode ?
Thanks for this video. Do you have any idea how i can implement role for users on the registration form
Danny, sorry but I never implemented role-based access in Xamarin
how about the authentication for andriod?
Check the Github repo : github.com/techwithpat/XamarinFormsFirebaseAth
Does this not work for android?
Hey Pat! .How could I implement it in android?
In Firebase :
Register an Android App. You will get a file named "google-services.json".
In Visual Studio, in the Android project :
add the following packages "Xamarin.Firebase.Auth" and "Xamarin.Firebase.Core".
add the "google-services.json" file, set the build action to "GoogleServicesJson", you will need to edit the project file (.csproj) like below
ItemGroup>
In the main activity file, before the "LoadApplication" method, initialize Firebase.
FirebaseApp.InitializeApp(Application.Context)
In the service implementation, the code is the same, except the way you access the Firebase current instance.
iOS : Firebase.Auth.Auth.DefaultInstance
android : Firebase.Auth.FirebaseAuth.Instance
@@TechWithPat Thank You so much! By the way, do you plan to make a video one day, but now have you implemented authentication for Google? Thanks again and excuse my English
@@brianfortuna50 You welcome! no, I haven't planned a video for google auth but that may be something to try
@@TechWithPat Thank you very much, go perfect in iOS but in Android I am unable to compile without errors, so it's not just the "Firebase.Auth.FirebaseAuth.Instance", do you have the file to compare it? Thanks again I have already subscribed!
@@Activity247 I agree, I oversimplified. You can find the Android implementation in the following repository : github.com/estyval/XamarinFormsFirebaseAth/tree/add-android
These are the versions of the nuget package used :
Xamarin.Firebase.Auth : 71.1605.4
Xamarin.Firebase.Core : 71.1601.4
I am not signed in still it doesn't go to sign-In page but directly opens Homepage
Check the source code in the description, it has all you need.
Thanks for such a useful🥰 information thanks
Thanks bro
I've learned a lot from this video
Keep up the good work.
.
I want to contact you regarding a job
@TechWithPat
Hi there, first of all thanks for this great tutorial. Sadly I got an error and do not know any help even though I tried a lot. Probably you are able to help me:
I got in the class Firabase Authentication in the Android Folder the following error:
class FirebaseAuth.Firebase.Auth
CS0433: The type 'FirebaseAuth' exist in both 'Firebase.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Xamarin.Firebase.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
I hope for your help.
Hi, check your dependencies, make sure the package is referenced only once.
@@TechWithPat Hey Pat, my dependencies look okay. Where do I find those references?
@@FatherofDragonsTry to delete "bin" and "obj" folders, if it doesn't work, check in the AndroidManifest.xml file for any duplicate service.
@@TechWithPat thanks for ur help bro so far. I did managed it that it works. I ve got one more issue to solve. When I want to sign in a new user in the FirebaseAuthentication class. I get an error with the GetIdTokenAsync method:
Error CS1061 'FirebaseUser' does not contain a definition for 'GetIdTokenAsync' and no accessible extension method 'GetIdTokenAsync' accepting a first argument of type 'FirebaseUser' could be found (are you missing a using directive or an assembly reference?)
Do you have any Idea?
By the way firebase contains a lot of stuff like documentations. Could you tell me which one you use? Because there is no exactly help for Xamarin. Only for unity and stuff or is this kind of similar?
There is no documentation for Xamarin, I looked at the code in the nuget package.
If you still have troubles, clone the repo for this video, it works.
github.com/estyval/XamarinFormsFirebaseAth/tree/add-android