/Firebase.Auth.Unofficial

An unofficial package for Firebase Auth, supporting creating users, logging in users, and validating tokens

Primary LanguageC#MIT LicenseMIT

Firebase.Auth.Unofficial

An unofficial package for Firebase Auth, supporting creating users, logging in users, and validating tokens

Usage

Install

Install using Nuget: Install-Package Firebase.Auth.Unofficial

Creating an Account API

To register and get tokens for users, please see the sample AccountController.

Setting up ASP.NET MVC Core Authorization

  1. Add the following line to the Startup.ConfigureServices() method:
services.AddFirebaseAuthorization("my api key");
  1. Add the following filter to routes to add authorization:
[Authorize(Policy = "Firebase")]

Please see the TestWebApp for more details.

Notice

This is using Google Identity Toolkit's APIs directly, the same API's consumed by Firebase's SDKs. These could change! Be careful.

Credit

Thank you to @rlamasb and his Firebase.Xamarin repo, where I "borrowed" a good chunk of code from.