Dreamine.Identity
1.0.1
dotnet add package Dreamine.Identity --version 1.0.1
NuGet\Install-Package Dreamine.Identity -Version 1.0.1
<PackageReference Include="Dreamine.Identity" Version="1.0.1" />
<PackageVersion Include="Dreamine.Identity" Version="1.0.1" />
<PackageReference Include="Dreamine.Identity" />
paket add Dreamine.Identity --version 1.0.1
#r "nuget: Dreamine.Identity, 1.0.1"
#:package Dreamine.Identity@1.0.1
#addin nuget:?package=Dreamine.Identity&version=1.0.1
#tool nuget:?package=Dreamine.Identity&version=1.0.1
Dreamine.Identity
Shared identity and authentication infrastructure for Dreamine and CodeMaru web applications.
Dreamine.Identity provides local email/password accounts, OAuth login, a SQLite-backed user store, shared authentication cookies, and built-in account pages for Dreamine family services.
Purpose
Use this package when multiple Dreamine or CodeMaru services should share the same login state.
Typical examples:
codemaru.co.krwedding.codemaru.co.krthankyou.codemaru.co.kr- future Dreamine family services that need the same account database
The package is intentionally small: application-specific ownership rules, tenant data, service permissions, and domain features should stay in each app.
Key Features
- Local email/password signup and login
- Google OAuth login
- Naver OAuth login
- Kakao OAuth login
- Shared cookie authentication across subdomains
- Shared DataProtection key support for multi-process deployments
- SQLite user store through Dreamine Database providers
- Built-in login, signup, account, and sign-out pages
- WPF/Blazor hybrid host integration helpers
Main Types
AuthOptionsOAuthProviderOptionsAuthUserIUserStoreSqliteUserStoreAnonymousAuthenticationStateProviderDreamineIdentityExtensions
Important claim types exposed by DreamineIdentityExtensions:
UserIdClaimType(dreamine:userid)ProviderClaimType(dreamine:provider)
Use the claim named by UserIdClaimType as the stable internal user key when connecting service data to a logged-in account.
Package Boundary
This package owns:
- account creation
- password validation and password change
- OAuth callbacks
- user record persistence
- authentication cookie configuration
- login/account HTML endpoints
This package does not own:
- service-specific tenant records
- wedding invitation ownership
- card landing page ownership
- CCTV stream permissions
- billing, roles, or admin policies
Those rules belong to the consuming application.
Quick Start
1) Add a project reference
<ItemGroup>
<ProjectReference Include="..\..\..\100. Library\Identity\Dreamine.Identity.csproj" />
</ItemGroup>
2) Configure authentication settings
{
"Authentication": {
"UsersDbPath": "C:\\Codemaru\\App_Data\\codemaru.db",
"Google": {
"ClientId": "",
"ClientSecret": ""
},
"Naver": {
"ClientId": "",
"ClientSecret": ""
},
"Kakao": {
"ClientId": "",
"ClientSecret": ""
},
"CookieDomain": ".codemaru.co.kr",
"CookieName": ".Dreamine.Identity",
"DataProtectionKeysPath": "C:\\Codemaru\\App_Data\\IdentityKeys",
"DataProtectionApplicationName": "Dreamine.Identity"
}
}
Keep OAuth secrets in user secrets, environment variables, or server-only configuration files. Do not commit real client secrets.
3) Register WPF host helpers
using Dreamine.Identity;
builder.Services.AddDreamineIdentityWpfHost();
This registers a safe AuthenticationStateProvider for the WPF host side.
4) Register identity in the Blazor server host
using Dreamine.Identity;
using Dreamine.Identity.Options;
var authOptions = builder.Configuration
.GetSection(AuthOptions.SectionName)
.Get<AuthOptions>() ?? new AuthOptions();
var usersDbPath = builder.Configuration[$"{AuthOptions.SectionName}:UsersDbPath"]
?? Path.Combine(AppContext.BaseDirectory, "App_Data", "codemaru.db");
options.AddDreamineIdentity(authOptions, usersDbPath);
AddDreamineIdentity(...) wires:
IUserStore- SQLite user database provider
- cookie authentication
- OAuth providers
- authentication/authorization middleware
- built-in auth endpoints
Built-in Endpoints
Canonical endpoints:
GET /_identity/loginPOST /_identity/loginPOST /_identity/signupGET /_identity/accountPOST /_identity/accountGET /_identity/signout
Compatibility aliases:
/login/signup/account/signout
OAuth challenge endpoints:
GET /signin/googleGET /signin/naverGET /signin/kakao
OAuth callback paths:
/signin-google/signin-naver/signin-kakao
Register these callback URLs in each provider console for every deployed domain that can initiate login.
Shared Login Requirements
For subdomain login sharing, every participating app must use the same values:
{
"CookieDomain": ".codemaru.co.kr",
"CookieName": ".Dreamine.Identity",
"DataProtectionKeysPath": "C:\\Codemaru\\App_Data\\IdentityKeys",
"DataProtectionApplicationName": "Dreamine.Identity",
"UsersDbPath": "C:\\Codemaru\\App_Data\\codemaru.db"
}
If any one of these differs, users may appear logged in on one service but anonymous on another.
For local development on localhost, shared subdomain cookies do not behave the same way as production domains. Use provider callbacks for each local port, and leave CookieDomain empty if testing isolated local apps.
Account Model
AuthUser stores one logical account row per provider identity.
Natural key:
(Provider, ProviderKey)
Different providers are treated as separate identities even when they expose the same email address. Service apps should store ownership by the internal AuthUser.Id, not by email, display name, nickname, or provider-specific account text.
Dependencies
Dreamine.Database.AbstractionsDreamine.Database.CoreDreamine.Database.SqliteDreamine.Hybrid.WpfMicrosoft.AspNetCore.AppMicrosoft.AspNetCore.Authentication.GoogleAspNet.Security.OAuth.NaverAspNet.Security.OAuth.KakaoTalkMicrosoft.AspNetCore.Components.Authorization
Target Frameworks
net8.0
net8.0-windows7.0
License
MIT License
| 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. net8.0-windows7.0 is compatible. 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. |
-
net8.0
- AspNet.Security.OAuth.KakaoTalk (>= 8.0.0)
- AspNet.Security.OAuth.Naver (>= 8.0.0)
- Dreamine.Database.Abstractions (>= 1.0.1)
- Dreamine.Database.Core (>= 1.0.1)
- Dreamine.Database.Sqlite (>= 1.0.1)
- Microsoft.AspNetCore.Authentication.Google (>= 8.0.20)
- Microsoft.AspNetCore.Components.Authorization (>= 8.0.20)
-
net8.0-windows7.0
- AspNet.Security.OAuth.KakaoTalk (>= 8.0.0)
- AspNet.Security.OAuth.Naver (>= 8.0.0)
- Dreamine.Database.Abstractions (>= 1.0.1)
- Dreamine.Database.Core (>= 1.0.1)
- Dreamine.Database.Sqlite (>= 1.0.1)
- Dreamine.Hybrid.Wpf (>= 1.0.3)
- Microsoft.AspNetCore.Authentication.Google (>= 8.0.20)
- Microsoft.AspNetCore.Components.Authorization (>= 8.0.20)
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.0.1 | 35 | 7/28/2026 |