Plugin.Firebase.Auth
3.0.0
See the version list below for details.
dotnet add package Plugin.Firebase.Auth --version 3.0.0
NuGet\Install-Package Plugin.Firebase.Auth -Version 3.0.0
<PackageReference Include="Plugin.Firebase.Auth" Version="3.0.0" />
paket add Plugin.Firebase.Auth --version 3.0.0
#r "nuget: Plugin.Firebase.Auth, 3.0.0"
// Install Plugin.Firebase.Auth as a Cake Addin #addin nuget:?package=Plugin.Firebase.Auth&version=3.0.0 // Install Plugin.Firebase.Auth as a Cake Tool #tool nuget:?package=Plugin.Firebase.Auth&version=3.0.0
Auth
You can use Firebase Authentication to allow users to sign in to your app using one or more sign-in methods, including email address and password sign-in, and federated identity providers such as Google Sign-in and Facebook Login.
Installation
Nuget
Install-Package Plugin.Firebase.Auth
Setup
- Follow the instructions for the basic setup
- Enable Authentication at your project in the Firebase Console.
- When using Plugin.Firebase.Auth.Google, add the following lines of code after calling
CrossFirebase.Initialize()
:
#if IOS
FirebaseAuthGoogleImplementation.Initialize();
#elif ANDROID
FirebaseAuthGoogleImplementation.Initialize("your-google-request-id-token");
#endif
- The
googleRequestIdToken
can be accessed at the Google API Console (make sure to use the Client-ID of the Web client)
iOS specifics
- Enable keychain entitlement in Entitlements.plist:
<dict>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)my.fancy.app</string>
</array>
</dict>
- In case you are using Authentication via Google, add an url scheme to your apps
Info.plist
:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.123456-abcdef</string>
</array>
</dict>
</array>
- For more specific instructions take a look at the official Firebase documentation
Android specifics
- Make sure you have added the SHA-1 fingerprint matching the keystore you've used for signing the app bundle to the android project settings in the firebase console:
- Call
FirebaseAuthImplementation.HandleActivityResultAsync(requestCode, resultCode, data);
fromMainActivity.OnActivityResult(...)
- If you are on version 2.0.5 or later, add the following package to your project's
.csproj
file to prevent build errors:
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.6.0.2" />
For more specific instructions take a look at the official Firebase documentation
Usage
Take a look at the documentation for the AdamE.Firebase.iOS.Auth packages, because Plugin.Firebase's code is abstracted but still very similar.
Since code should be documenting itself you can also take a look at the following classes:
- src/.../IFirebaseAuth.cs
- src/.../IFirebaseUser.cs
- tests/.../AuthFixture.cs
- sample/.../AuthService.cs
Release notes
- Version 3.0.0
- Swapped Xamarin.Firebase.iOS.Auth (native SDK 8.10.0) for AdamE.Firebase.iOS.Auth (native SDK 10.24.0)
- Version 2.0.7
- Added AddAuthStateListener to FirebaseAuth (PR #246)
- Version 2.0.6
- Fix dates in android AuthTokenResultWrapper (issue #244)
- Version 2.0.5
- Bump up Xamarin.Firebase.Auth from 121.0.8 to 122.2.0 (issue #131)
- Version 2.0.4
- Separating Auth.Google into its own package (PR #210)
- Version 2.0.3
- Return
FirebaseUser
inFirebaseAuthImplementation.CreateUserAsync(email, password)
method (issue #183)
- Return
- Version 2.0.2
- Bump up Xamarin.Google.iOS.SignIn from 5.0.2.3 to 5.0.2.4 (issue #158)
- Version 2.0.1
- Remove unnecessary UseMaui property from csproj files
- Readd net6.0 tfm
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-android31.0 is compatible. net6.0-ios was computed. net6.0-ios16.1 is compatible. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Plugin.Firebase.Core (>= 3.0.0)
-
net6.0-android31.0
- Plugin.Firebase.Core (>= 3.0.0)
- Xamarin.Firebase.Auth (>= 122.2.0)
-
net6.0-ios16.1
- AdamE.Firebase.iOS.Auth (>= 10.24.0)
- Plugin.Firebase.Core (>= 3.0.0)
- System.Runtime.InteropServices.NFloat.Internal (>= 6.0.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Plugin.Firebase.Auth:
Package | Downloads |
---|---|
Plugin.Firebase
The plugin includes cross-platform APIs for Firebase Analytics, Auth, Cloud Messaging, Crashlytics, Dynamic Links, Firestore, Cloud Functions, Remote Config and Storage. |
|
Plugin.Firebase.Auth.Google
The plugin includes cross-platform APIs for Firebase Auth. |
|
Plugin.Firebase.Auth.Facebook
The plugin includes cross-platform APIs for Firebase Auth. |
GitHub repositories
This package is not used by any popular GitHub repositories.