IDataProtectionFirebase 1.1.1.2

Additional Details

Version 1.1.1.6 is the first package that should be used. These previous versions have minor issues so I would prefer them not to be used.

There is a newer version of this package available.
See the version list below for details.
dotnet add package IDataProtectionFirebase --version 1.1.1.2
                    
NuGet\Install-Package IDataProtectionFirebase -Version 1.1.1.2
                    
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.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IDataProtectionFirebase" Version="1.1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="IDataProtectionFirebase" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IDataProtectionFirebase --version 1.1.1.2
                    
#r "nuget: IDataProtectionFirebase, 1.1.1.2"
                    
#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.
#:package IDataProtectionFirebase@1.1.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IDataProtectionFirebase&version=1.1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=IDataProtectionFirebase&version=1.1.1.2
                    
Install as a Cake Tool

IDataProtectionFirebase

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

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()
        .SetApplicationName(Assembly.GetExecutingAssembly().FullName!)
        .PersistKeysToFirebase(service_name, json_credentials, project_id);

    services.AddMvc();
}

Service Name

The service_name is to help you identify the data entries in the firebase database

Project ID

The project_id is provided by google:

Unit Test

You will also need to update the ProjectId field inside of the appsettings.Test.json

{
  "ProjectId": "project-id-from-gcp-firebase"
}

JSON Credentials

You will also need to create a service account key 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 three unit tests and scan through the appsettings.Test.json.

You can also use the sample-json-credentials.json as reference.

This is just a note 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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 560 1/17/2023
1.1.1.7 1,151 2/13/2022
1.1.1.6 474 2/13/2022
1.1.1.5 562 2/13/2022 1.1.1.5 is deprecated.
1.1.1.4 541 2/13/2022 1.1.1.4 is deprecated.
1.1.1.3 545 2/13/2022 1.1.1.3 is deprecated.
1.1.1.2 547 2/13/2022 1.1.1.2 is deprecated.
1.1.1.1 542 2/13/2022 1.1.1.1 is deprecated.