IDataProtectionFirebase 1.1.1.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package IDataProtectionFirebase --version 1.1.1.6                
NuGet\Install-Package IDataProtectionFirebase -Version 1.1.1.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IDataProtectionFirebase" Version="1.1.1.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IDataProtectionFirebase --version 1.1.1.6                
#r "nuget: IDataProtectionFirebase, 1.1.1.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install IDataProtectionFirebase as a Cake Addin
#addin nuget:?package=IDataProtectionFirebase&version=1.1.1.6

// Install IDataProtectionFirebase as a Cake Tool
#tool nuget:?package=IDataProtectionFirebase&version=1.1.1.6                

IDataProtectionFirebase

A .NET library for IDataProtection to store keys in a Google Firebase instance.

GitHub Repository URL: https://github.com/kibblewhite/IDataProtectionFirebase

Getting Started

Follow the examples below to see how the library can be integrated into your application.

public void ConfigureServices(IServiceCollection services)
{
    services.AddDataProtection()
        .PersistKeysToFirebase(service_name, json_credentials);

    services.AddMvc();
}

If the FirestoreDb instance is already in the running assembly's service collection ready for DI, then the following code can be used: The library will throw an ArgumentNullException if the FirestoreDb can not be located.

public void ConfigureServices(IServiceCollection services)
{
    service_container.AddDataProtection()
        .PersistKeysToFirebase(service_name);

    services.AddMvc();
}

To see a examples of this code, please visit the UnitTests.cs within the Tests project. If you wish to run the unit tests, you will need to have a valid credentials.json in the unit test project directory that has access to your Firebase DB instance from GCP.

Service Name

The service_name can be any "reasonable" string value that you wish. It is to help you identify the data entries in the firebase database

JSON Credentials

You will also need to create a service account key (which has access to the Firebase DB) in the form of a JSON key file (credentials.json)

Read this into the json_credentials variable.

You can get this from the Google Cloud Platform console (GCP), for more information on this read the following:

Getting Help

Unfortunately it is only me, feel free to submit bug reports or feature requests, but please keep in mind that it is not a priority for me to keep this project updated or operational.

Note

Check out the unit tests and you can also use the credentials.sample.json as reference.

This is just a note more for me than for you, to remind me of the nuget publish command:

dotnet nuget push IDataProtectionFirebase\bin\Release\net6.0\publish\IDataProtectionFirebase.*.nupkg -k [api-key-here /] -s https://api.nuget.org/v3/index.json
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1.8 515 1/17/2023
1.1.1.7 1,096 2/13/2022
1.1.1.6 418 2/13/2022
1.1.1.5 467 2/13/2022 1.1.1.5 is deprecated.
1.1.1.4 445 2/13/2022 1.1.1.4 is deprecated.
1.1.1.3 447 2/13/2022 1.1.1.3 is deprecated.
1.1.1.2 451 2/13/2022 1.1.1.2 is deprecated.
1.1.1.1 448 2/13/2022 1.1.1.1 is deprecated.