Morris.AspNetCore.Authentication.Metamask.Blazor
0.1.0-Alpha1
Prefix Reserved
This is a prerelease version of Morris.AspNetCore.Authentication.Metamask.Blazor.
dotnet add package Morris.AspNetCore.Authentication.Metamask.Blazor --version 0.1.0-Alpha1
NuGet\Install-Package Morris.AspNetCore.Authentication.Metamask.Blazor -Version 0.1.0-Alpha1
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="Morris.AspNetCore.Authentication.Metamask.Blazor" Version="0.1.0-Alpha1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Morris.AspNetCore.Authentication.Metamask.Blazor --version 0.1.0-Alpha1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Morris.AspNetCore.Authentication.Metamask.Blazor, 0.1.0-Alpha1"
#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 Morris.AspNetCore.Authentication.Metamask.Blazor as a Cake Addin #addin nuget:?package=Morris.AspNetCore.Authentication.Metamask.Blazor&version=0.1.0-Alpha1&prerelease // Install Morris.AspNetCore.Authentication.Metamask.Blazor as a Cake Tool #tool nuget:?package=Morris.AspNetCore.Authentication.Metamask.Blazor&version=0.1.0-Alpha1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Morris.AspNetCore.Authentication.Metamask.Blazor
Metamask auth for Blazor apps.
- Create a new Blazor web app with authentication.
- In Program.cs add
using Morris.AspNetCore.Authentication.Metamask.Blazor;
- Find the following code
builder.Services.AddAuthentication(options =>
{
options.DefaultScheme = IdentityConstants.ApplicationScheme;
options.DefaultSignInScheme = IdentityConstants.ExternalScheme;
})
.AddIdentityCookies();
and add .AddMetamask()
builder.Services.AddAuthentication(options =>
{
options.DefaultScheme = IdentityConstants.ApplicationScheme;
options.DefaultSignInScheme = IdentityConstants.ExternalScheme;
})
.AddMetamask()
.AddIdentityCookies();
- Find the following code
app.MapRazorComponents<App>()
and add the following additional assembly
app.MapRazorComponents<App>()
.AddAdditionalAssemblies(typeof(MetamaskOptions).Assembly)
- Edit
Routes.razor
(or wherever your<Router>
component is, and register additional assemblies
<Router AppAssembly="typeof(Program).Assembly">
change to
@using Morris.AspNetCore.Authentication.Metamask.Blazor
<Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies=@([typeof(MetamaskOptions).Assembly])>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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.
-
net8.0
- Microsoft.AspNetCore.Authentication (>= 2.2.0)
- Microsoft.AspNetCore.Components.Web (>= 8.0.10)
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 |
---|---|---|
0.1.0-Alpha1 | 47 | 10/15/2024 |