Thanks to visit codestin.com
Credit goes to github.com

Skip to content

StefH/Blazor.WebAssembly.Authentication.Auth0

Repository files navigation

Blazor.WebAssembly.Authentication.Auth0

Blazor WebAssembly Auth0 Oidc Authentication with support for Audience, because the default AddOidcAuthentication does not support setting the Audience.

NuGet

NuGet

PM> Install-Package WebAssembly.Authentication.Auth0

Usage

Define app.settings

{
  "auth0": {
    "Authority": "https://***.eu.auth0.com/",
    "Audience": "***",
    "ClientId": "***",
    "ResponseType": "token id_token",
    "DefaultScopes": "email"
  }
}

Add the required services

Support for authenticating users is registered in the service container with the AddAuth0Authentication extension method provided by the this package. This method sets up the services required for the app to interact with the Identity Provider (IP).

builder.Services.AddAuth0Authentication(options =>
{
    builder.Configuration.Bind("auth0", options.ProviderOptions);
});

📚 References

About

Blazor WebAssembly Auth0 Oidc Authentication with support for Audience

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •