Forge.Security.Jwt.Client.Storage.Browser 1.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Forge.Security.Jwt.Client.Storage.Browser --version 1.3.0                
NuGet\Install-Package Forge.Security.Jwt.Client.Storage.Browser -Version 1.3.0                
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="Forge.Security.Jwt.Client.Storage.Browser" Version="1.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Forge.Security.Jwt.Client.Storage.Browser --version 1.3.0                
#r "nuget: Forge.Security.Jwt.Client.Storage.Browser, 1.3.0"                
#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 Forge.Security.Jwt.Client.Storage.Browser as a Cake Addin
#addin nuget:?package=Forge.Security.Jwt.Client.Storage.Browser&version=1.3.0

// Install Forge.Security.Jwt.Client.Storage.Browser as a Cake Tool
#tool nuget:?package=Forge.Security.Jwt.Client.Storage.Browser&version=1.3.0                

Forge.Security.Jwt.Client.Storage.Browser

Forge.Security.Jwt.Client.Storage.Browser is a library extension that provides access to the browsers local and session storage APIs for WASM applications.

Installing

To install the package add the following line to you csproj file replacing x.x.x with the latest version number:

<PackageReference Include="Forge.Security.Jwt.Client.Storage.Browser" Version="x.x.x" />

You can also install via the .NET CLI with the following command:

dotnet add package Forge.Security.Jwt.Client.Storage.Browser

If you're using Visual Studio you can also install via the built in NuGet package manager.

Setup

You will need to register the local storage services with the service collection in your Startup.cs file in Blazor Server.

public void ConfigureServices(IServiceCollection services)
{
	// ... preinitialization steps

	// always add this code after the "Forge.Security.Jwt.Client" library initialization
    services.AddForgeJwtClientAuthenticationCoreWithLocalStorage();
	services.AddForgeJwtClientAuthenticationCoreWithSessionStorage();
}

Or in your Program.cs file in Blazor WebAssembly.

public static async Task Main(string[] args)
{
    var builder = WebAssemblyHostBuilder.CreateDefault(args);
    builder.RootComponents.Add<App>("app");

    builder.Services.AddForgeJwtClientAuthenticationCoreWithLocalStorage();
    builder.Services.AddForgeJwtClientAuthenticationCoreWithSessionStorage();

    await builder.Build().RunAsync();
}

Registering services as Singleton

If you would like to register Storage Provider services as singletons, it is possible by using the following method:

builder.Services.AddForgeJwtClientAuthenticationCoreAsSingletonWithLocalStorage();
builder.Services.AddForgeJwtClientAuthenticationCoreAsSingletonWithSessionStorage();

This method is not recommended in the most cases, try to avoid using it.

Please also check the following projects in my repositories:

  • Forge.Yoda
  • Forge.Security.Jwt.Service
  • Forge.Security.Jwt.Service.Storage.SqlServer
  • Forge.Security.Jwt.Client
  • Forge.Security.Jwt.Client.Storage.Browser
  • Forge.Wasm.BrowserStorages
  • Forge.Wasm.BrowserStorages.NewtonSoft.Json
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.3.1 257 12/5/2023
1.3.0 182 5/25/2023
1.2.7 152 5/16/2023
1.2.5 356 12/22/2022
1.2.4 334 11/21/2022
1.2.3 386 10/27/2022
1.2.2 391 10/24/2022