Synetec.UserManager
1.0.8
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Synetec.UserManager --version 1.0.8
NuGet\Install-Package Synetec.UserManager -Version 1.0.8
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="Synetec.UserManager" Version="1.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Synetec.UserManager" Version="1.0.8" />
<PackageReference Include="Synetec.UserManager" />
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 Synetec.UserManager --version 1.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Synetec.UserManager, 1.0.8"
#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 Synetec.UserManager@1.0.8
#: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=Synetec.UserManager&version=1.0.8
#tool nuget:?package=Synetec.UserManager&version=1.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Synetec.UserManager
This library enables user management within an application using Microsoft B2C Authentication.
It supports key workflows such as:
- Inviting a user to the application
- Validating a user token, returning the B2C workflow to use
- Roles for the user, including an authorization filter
Configuration
{
"UserManager": {
"AzureAdB2C": {
"Instance": "https://<B2Cdomain>.b2clogin.com/tfp/",
"Domain": "<B2Cdomain>.onmicrosoft.com",
"ClientId": "00000000-0000-0000-0000-000000000000",
"TenantId": "00000000-0000-0000-0000-000000000000",
"SignUpSignInPolicyId": "B2C_1_<policy_name>",
"ResetPasswordPolicyId": "B2C_1_<policy_name>",
"EditProfilePolicyId": "B2C_1_<policy_name>"
},
"Database": {
"ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=Synetec.UserManager;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"Email":{
"DefaultFromEmail": "sender@test.com",
"ApiKey": "SendGrid API Key",
"DefaultToEmail": "recipient@test.com", // When set all email is sent to this address
"SignUpEmail": {
"Template": "<relative path to template>",
"Subject": "Subject line for email",
"FromEmail": "differentsender@test.com",
"Url":"<URL for registration page>"
},
"ChangedEmailTemplate": {
"Template": "<relative path to template>",
"Subject": "Subject line for email",
"FromEmail": "differentsender@test.com",
"Url":"<URL for registration page>"
}
},
"SignUpJwt" : {
"Issuer": "https://usermanager",
"Audience": "https://usermanager",
"Secret" : "<Secret key - must be at least 256 bytes>"
}
}
}
Authentication registration
For .Net8 and greater, the JWT authentication will automatically be registered when the DI container is initialized.
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddUserManager(builder.Configuration);
Database
Tables required to support this, will automatically be created in a Schema called UserManager.
Migrations should be run by the Azure Pipeline or your code.
| 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. 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.
-
net8.0
- Asp.Versioning.Http (>= 8.1.0)
- Asp.Versioning.Mvc.ApiExplorer (>= 8.1.0)
- FluentResults (>= 3.16.0)
- MediatR (>= 12.4.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.8)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Identity.Web (>= 3.0.1)
- Synetec.Core (>= 1.0.4)
- Synetec.Notifications (>= 3.0.1)
- System.Net.Http (>= 4.3.4)
- System.Text.RegularExpressions (>= 4.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.