https://github.com/rageagainstthepixel/com.rest.firebase.authentication
A non-official Firebase RESTful Authentication Client for Unity (UPM)
https://github.com/rageagainstthepixel/com.rest.firebase.authentication
firebase firebase-auth firebase-authentication openupm unity unity-asset unity-scripts unity3d unity3d-plugin upm upm-package
Last synced: about 1 year ago
JSON representation
A non-official Firebase RESTful Authentication Client for Unity (UPM)
- Host: GitHub
- URL: https://github.com/rageagainstthepixel/com.rest.firebase.authentication
- Owner: RageAgainstThePixel
- License: mit
- Created: 2021-06-14T22:03:57.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-28T05:25:09.000Z (about 2 years ago)
- Last Synced: 2025-04-15T12:14:29.774Z (about 1 year ago)
- Topics: firebase, firebase-auth, firebase-authentication, openupm, unity, unity-asset, unity-scripts, unity3d, unity3d-plugin, upm, upm-package
- Language: C#
- Homepage:
- Size: 354 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Firebase.Authentication
[](https://discord.gg/xQgMW9ufN4)
[](https://openupm.com/packages/com.rest.firebase.authentication/)
A non-official [Firebase](https://firebase.google.com/) RESTful Authentication Client for the [Unity](https://unity.com/) Game Engine.
Based on [FirebaseAuthentication.net](https://github.com/step-up-labs/firebase-authentication-dotnet)
***All copyrights, trademarks, logos, and assets are the property of their respective owners.***
## Installing
### Via Unity Package Manager and OpenUPM
- Open your Unity project settings
- Add the OpenUPM package registry:
- `Name: OpenUPM`
- `URL: https://package.openupm.com`
- `Scope(s):`
- `com.rest.firebase`
- `com.utilities`

- Open the Unity Package Manager window
- Change the Registry from Unity to `My Registries`
- Add the `Firebase.Authentication` package
### Via Unity Package Manager and Git url
- Open your Unity Package Manager
- Add package from git url: `https://github.com/RageAgainstThePixel/com.rest.firebase.authentication.git#upm`
> Note: this repo has dependencies on other repositories! You are responsible for adding these on your own.
- [com.utilities.async](https://github.com/RageAgainstThePixel/com.utilities.async)
---
## Documentation
### Project Setup
By default the `FirebaseAuthenticationClient` will attempt to load the `FirebaseConfigurationSettings.asset` scriptable object asset if one exists.
If no `FirebaseConfigurationSettings.asset` can be found then the client will attempt to load te `google-services.json` file in the local project folder.
Last, it will attempt to load the environment variable `FIREBASE_CONFIGURATION` which should point to a `google-services.json` path.
Alternatively, you can also explicitly specify an api key and auth domain when creating the client:
```csharp
var firebaseClient = new FirebaseAuthenticationClient("apiKey", "hello.firebase.com");
FirebaseUser firebaseUser;
try
{
firebaseUser = await firebaseClient.SignInWithEmailAndPasswordAsync("username", "password");
}
catch (Exception e)
{
Debug.LogError(e);
return;
}
Debug.Log($"Signed in as {firebaseUser.Info.DisplayName}");
firebaseClient.SignOut();
```
## Additional Packages
- [Firebase.Storage](https://github.com/RageAgainstThePixel/com.rest.firebase.storage)
- [Firebase.Firestore](https://github.com/RageAgainstThePixel/com.rest.firebase.firestore)
- [Firebase.Realtime-Database](https://github.com/RageAgainstThePixel/com.rest.firebase.realtime-database)