Skip to content

Commit aed7138

Browse files
committed
Completed DX Fundamentals & First Quick Start and Examples in Readme.md
1 parent 515152a commit aed7138

File tree

53 files changed

+654
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+654
-185
lines changed

README.md

Lines changed: 161 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ UltimateAuth is an open-source authentication framework that unifies secure sess
2525

2626
## 🌟 Why UltimateAuth: The Six-Point Principles
2727

28-
### **1) Developer-Centric**
28+
### **1) Developer-Centric & User-Friendly**
2929
Clean APIs, predictable behavior, minimal ceremony — designed to make authentication *pleasant* for developers.
3030

3131
### **2) Security-Driven**
@@ -38,40 +38,159 @@ No forced dependencies. No unnecessary weight.
3838
### **4) Plug-and-Play Ready**
3939
From setup to production, UltimateAuth prioritizes a frictionless integration journey with sensible defaults.
4040

41-
### **5) User-Friendly Flows**
42-
Authentication should be secure *and* intuitive.
43-
Consistent, predictable, and UX-friendly at every step.
44-
45-
### **6) Blazor & MAUI-Ready for Modern .NET**
41+
### **5) Blazor & MAUI-Ready for Modern .NET**
4642
Blazor WebApp, Blazor WASM, Blazor Server, and .NET MAUI expose weaknesses in traditional auth systems.
4743
UltimateAuth is engineered from day one to support real-world scenarios across the entire modern .NET UI stack.
4844

49-
---
50-
51-
## 🔑 What UltimateAuth Provides
45+
### **6) Unified Framework**
46+
One solution, same codebase across Blazor server, WASM and MAUI. UltimateAuth handles client differences internally and providing consistent and reliable public API.
5247

53-
- A **secure, modern session-based authentication core**
54-
(opaque SessionId, server-managed, real-time revocation, device tracking)
55-
56-
- A **unified architecture** bridging Session, PKCE, and OAuth-style auth flows
48+
---
5749

58-
- An **override-first design** suitable for enterprise extensions
50+
# 🚀 Quick Start
51+
52+
### 1) Install packages (Will be available soon)
53+
54+
1.1 Core Packages
55+
```bash
56+
dotnet add package CodeBeam.UltimateAuth.Server
57+
dotnet add package CodeBeam.UltimateAuth.Client.Blazor
58+
```
59+
1.2 Persistence & Reference Packages (Choose One)
60+
```bash
61+
dotnet add package CodeBeam.UltimateAuth.InMemory.Bundle (for debug & development)
62+
dotnet add package CodeBeam.UltimateAuth.EntityFrameworkCore.Bundle (for production)
63+
```
64+
### 2) Configure services (in program.cs)
65+
Server registration:
66+
```csharp
67+
builder.Services
68+
.AddUltimateAuthServer()
69+
.AddUltimateAuthEntityFrameworkCore(); // Production
70+
71+
// OR
72+
73+
builder.Services
74+
.AddUltimateAuthServer()
75+
.AddUltimateAuthInMemory(); // Development
76+
77+
```
78+
79+
Client registration:
80+
81+
```csharp
82+
builder.Services.AddUltimateAuthClientBlazor();
83+
```
84+
**Usage by application type:**
85+
86+
- **Blazor Server App** → Use both Server and Client registrations
87+
- **Blazor WASM / MAUI** → Use Client only
88+
- **Auth Server / Resource API** → Use Server only
89+
90+
### 3) Configure pipeline
91+
```csharp
92+
// app.UseHttpsRedirection();
93+
// app.UseStaticFiles();
94+
95+
app.UseUltimateAuthWithAspNetCore(); // Includes UseAuthentication() and UseAuthorization()
96+
// Place Antiforgery or something else needed
97+
app.MapUltimateAuthEndpoints();
98+
99+
app.MapRazorComponents<App>()
100+
.AddInteractiveServerRenderMode()
101+
.AddUltimateAuthRoutes(UAuthAssemblies.BlazorClient());
102+
```
103+
104+
### 4) Add UAuth Script
105+
Place this in `App.razor` or `index.html`
106+
```csharp
107+
<script src="_content/CodeBeam.UltimateAuth.Client.Blazor/uauth.min.js"></script>
108+
```
109+
110+
### 5) Optional: Blazor Usings
111+
Add this in `_Imports.razor`
112+
```csharp
113+
@using CodeBeam.UltimateAuth.Client.Blazor
114+
```
115+
116+
### ✅ Done
59117

60-
- A **production-grade client SDK** for Blazor & MAUI
118+
---
61119

62-
- A **fully interactive sandbox**
63-
where developers can test flows, create accounts, simulate devices, and validate behaviors in real time
120+
## Usage
121+
122+
Inject IUAuthClient and simply call methods.
123+
124+
### Examples
125+
Login
126+
```csharp
127+
[Inject] IUAuthClient UAuthClient { get; set; } = null!;
128+
129+
private async Task Login()
130+
{
131+
var request = new LoginRequest
132+
{
133+
Identifier = "UAuthUser",
134+
Secret = "UAuthPassword",
135+
};
136+
await UAuthClient.Flows.LoginAsync(request);
137+
}
138+
```
139+
140+
Register
141+
```csharp
142+
[Inject] IUAuthClient UAuthClient { get; set; } = null!;
143+
144+
private async Task Register()
145+
{
146+
var request = new CreateUserRequest
147+
{
148+
UserName = _username,
149+
Password = _password,
150+
Email = _email,
151+
};
152+
153+
var result = await UAuthClient.Users.CreateAsync(request);
154+
if (result.IsSuccess)
155+
{
156+
Console.WriteLine("User created successfully.");
157+
}
158+
else
159+
{
160+
Console.WriteLine(result.ErrorText ?? "Failed to create user.");
161+
}
162+
}
163+
```
164+
165+
LogoutAll But Keep Current Device
166+
```csharp
167+
[Inject] IUAuthClient UAuthClient { get; set; } = null!;
168+
169+
private async Task LogoutOthersAsync()
170+
{
171+
var result = await UAuthClient.Flows.LogoutOtherDevicesSelfAsync();
172+
Console.WriteLine(result.IsSuccess);
173+
}
174+
```
175+
176+
UltimateAuth turns Auth into a simple application service — not a separate system you fight against.
177+
- No manual token handling
178+
- No custom HTTP plumbing
179+
- No fragile redirect logic
180+
- All built-in with extensible options.
64181

65182
---
66183

184+
67185
## 📅 Release Timeline (Targeted)
68186

69187
> _Dates reflect targeted milestones and may evolve with community feedback._
70188
71-
### **Q1 2026 — First Release (v 0.0.1 to v 0.1.0)**
72-
- Core session-based auth engine
189+
### **Q1 2026 — First Release**
190+
- v 0.1.0-preview to v 0.1.0
73191

74-
### **Q2 2026 — Stable Feature Release**
192+
### **Q2 2026 — Stable Feature Releases**
193+
- v 0.2.0 to v 0.3.0
75194

76195
### **Q3 2026 — General Availability**
77196
- API surface locked
@@ -83,6 +202,18 @@ UltimateAuth adopts .NET platform versioning to align with the broader ecosystem
83202

84203
---
85204

205+
## 🗺 Roadmap
206+
207+
The project roadmap is actively maintained as a GitHub issue:
208+
209+
👉 https://github.com/CodeBeamOrg/UltimateAuth/issues/8
210+
211+
We keep it up-to-date with current priorities, planned features, and progress.
212+
213+
Feel free to follow, comment, or contribute ideas.
214+
215+
---
216+
86217
## 📘 Documentation
87218

88219
Two documentation experiences will be provided:
@@ -100,20 +231,23 @@ Create accounts, simulate devices, test auth flows, and observe UltimateAuth in
100231
UltimateAuth is a community-first framework.
101232
We welcome proposals, discussions, architectural insights, and contributions of all sizes.
102233

103-
Before contributing, please see:
104-
105-
- `ROADMAP.md` — Release strategy
106-
107234
Discussions are open — your ideas matter.
108235

109236
---
110237

111238
## 🛠 Project Status
112239

113-
UltimateAuth is currently in the design and specification phase.
114-
We are shaping the architecture with real-world requirements, especially from Blazor and MAUI applications.
240+
UltimateAuth core architecture is implemented and validated through the sample application.
241+
242+
We are currently:
243+
244+
- Polishing developer experience
245+
- Reviewing public APIs
246+
- Preparing EF Core integration packages
247+
248+
Preview release is coming soon.
115249

116-
Early API drafts and prototypes will be published soon.
250+
You can check the samples and try what UltimateAuth offers by downloading repo and running locally.
117251

118252
---
119253

UltimateAuth.slnx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Solution>
22
<Folder Name="/Packages/">
33
<Project Path="nuget/CodeBeam.UltimateAuth.EntityFrameworkCore/CodeBeam.UltimateAuth.EntityFrameworkCoreReference.csproj" Id="764569b4-dd5b-4a18-a332-7307d20ee21a" />
4-
<Project Path="nuget/CodeBeam.UltimateAuth.InMemory/CodeBeam.UltimateAuth.InMemoryReference.csproj" />
4+
<Project Path="nuget/CodeBeam.UltimateAuth.InMemory/CodeBeam.UltimateAuth.InMemory.Bundle.csproj" />
5+
<Project Path="nuget/CodeBeam.UltimateAuth.Reference.Bundle/CodeBeam.UltimateAuth.Reference.Bundle.csproj" Id="f01dee6a-a60d-40a2-bb6a-9894b03e7122" />
56
</Folder>
67
<Folder Name="/Samples/">
78
<Project Path="samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/CodeBeam.UltimateAuth.Sample.BlazorServer.csproj" />
@@ -24,9 +25,8 @@
2425
<Project Path="src/authorization/CodeBeam.UltimateAuth.Authorization.InMemory/CodeBeam.UltimateAuth.Authorization.InMemory.csproj" Id="a1e6d007-bdc0-4574-b549-ec863757edd3" />
2526
<Project Path="src/authorization/CodeBeam.UltimateAuth.Authorization.Reference/CodeBeam.UltimateAuth.Authorization.Reference.csproj" Id="84b784d0-bb48-406a-a0d1-c600da667597" />
2627
<Project Path="src/authorization/CodeBeam.UltimateAuth.Authorization/CodeBeam.UltimateAuth.Authorization.csproj" Id="28b1d647-fb0b-4cc3-8503-2680c4a9b28f" />
27-
<Project Path="src/client/CodeBeam.UltimateAuth.Client/CodeBeam.UltimateAuth.Client.csproj" Id="fa128a9b-613c-4762-993a-2886280d3051" />
28-
<Project Path="src\client/CodeBeam.UltimateAuth.Client.JsMinifier/CodeBeam.UltimateAuth.Client.JsMinifier.csproj" Id="ef5cfc86-bfd3-4f81-a973-ce7ef58e7525" />
2928
<Project Path="src/client/CodeBeam.UltimateAuth.Client.Blazor/CodeBeam.UltimateAuth.Client.Blazor.csproj" Id="eb60a3b7-ba9d-48c9-98ad-b28e879b23bf" />
29+
<Project Path="src/client/CodeBeam.UltimateAuth.Client/CodeBeam.UltimateAuth.Client.csproj" Id="fa128a9b-613c-4762-993a-2886280d3051" />
3030
<Project Path="src/CodeBeam.UltimateAuth.Core/CodeBeam.UltimateAuth.Core.csproj" />
3131
<Project Path="src/CodeBeam.UltimateAuth.Server/CodeBeam.UltimateAuth.Server.csproj" Id="0a8cdd12-a8c4-4530-87e8-ae778c46322b" />
3232
<Project Path="src/credentials/CodeBeam.UltimateAuth.Credentials.Contracts/CodeBeam.UltimateAuth.Credentials.Contracts.csproj" Id="88b70848-fa74-40ea-bf34-3fa2f70f4f37" />
@@ -47,4 +47,5 @@
4747
<Project Path="src/users/CodeBeam.UltimateAuth.Users.InMemory/CodeBeam.UltimateAuth.Users.InMemory.csproj" Id="7ce3df22-4773-4b9b-afd0-8ba506e0f9de" />
4848
<Project Path="src/users/CodeBeam.UltimateAuth.Users.Reference/CodeBeam.UltimateAuth.Users.Reference.csproj" Id="601176dd-b760-4b6f-9cc7-c618134ae178" />
4949
<Project Path="src/users/CodeBeam.UltimateAuth.Users/CodeBeam.UltimateAuth.Users.csproj" Id="30d5db36-6dc8-46f6-9139-8b6b3d6053d5" />
50+
<Project Path="src\client/CodeBeam.UltimateAuth.Client.JsMinifier/CodeBeam.UltimateAuth.Client.JsMinifier.csproj" Id="ef5cfc86-bfd3-4f81-a973-ce7ef58e7525" />
5051
</Solution>

nuget/CodeBeam.UltimateAuth.EntityFrameworkCore/CodeBeam.UltimateAuth.EntityFrameworkCoreReference.csproj

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,34 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
<Version>0.1.0-preview.1</Version>
8-
<InformationalVersion>0.1.0-preview.1</InformationalVersion>
9-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
5+
<NoWarn>$(NoWarn);1591</NoWarn>
6+
7+
<PackageId>CodeBeam.UltimateAuth.EntityFrameworkCore.Bundle</PackageId>
8+
9+
<Description>
10+
Provides a complete Entity Framework Core persistence setup for UltimateAuth.
11+
This package includes reference domain implementations and Entity Framework Core-based persistence for all modules.
12+
It is designed for production scenarios requiring durable storage.
13+
</Description>
14+
15+
<PackageTags>authentication;authorization;identity;efcore;inmemory;bundle;auth-framework;security;jwt</PackageTags>
16+
<PackageIcon>logo.png</PackageIcon>
17+
<PackageReadmeFile>README.md</PackageReadmeFile>
1018
</PropertyGroup>
1119

1220
<ItemGroup>
13-
<ProjectReference Include="..\..\src\authentication\CodeBeam.UltimateAuth.Authentication.EntityFrameworkCore\CodeBeam.UltimateAuth.Authentication.EntityFrameworkCore.csproj" />
14-
<ProjectReference Include="..\..\src\authorization\CodeBeam.UltimateAuth.Authorization.EntityFrameworkCore\CodeBeam.UltimateAuth.Authorization.EntityFrameworkCore.csproj" />
15-
<ProjectReference Include="..\..\src\authorization\CodeBeam.UltimateAuth.Authorization.Reference\CodeBeam.UltimateAuth.Authorization.Reference.csproj" />
16-
<ProjectReference Include="..\..\src\credentials\CodeBeam.UltimateAuth.Credentials.EntityFrameworkCore\CodeBeam.UltimateAuth.Credentials.EntityFrameworkCore.csproj" />
17-
<ProjectReference Include="..\..\src\credentials\CodeBeam.UltimateAuth.Credentials.Reference\CodeBeam.UltimateAuth.Credentials.Reference.csproj" />
18-
<ProjectReference Include="..\..\src\sessions\CodeBeam.UltimateAuth.Sessions.EntityFrameworkCore\CodeBeam.UltimateAuth.Sessions.EntityFrameworkCore.csproj" />
19-
<ProjectReference Include="..\..\src\tokens\CodeBeam.UltimateAuth.Tokens.EntityFrameworkCore\CodeBeam.UltimateAuth.Tokens.EntityFrameworkCore.csproj" />
20-
<ProjectReference Include="..\..\src\users\CodeBeam.UltimateAuth.Users.EntityFrameworkCore\CodeBeam.UltimateAuth.Users.EntityFrameworkCore.csproj" />
21-
<ProjectReference Include="..\..\src\users\CodeBeam.UltimateAuth.Users.Reference\CodeBeam.UltimateAuth.Users.Reference.csproj" />
21+
<ProjectReference Include="..\CodeBeam.UltimateAuth.Reference.Bundle\CodeBeam.UltimateAuth.Reference.Bundle.csproj" />
22+
<ProjectReference Include="..\..\src\authentication\CodeBeam.UltimateAuth.Authentication.EntityFrameworkCore\CodeBeam.UltimateAuth.Authentication.EntityFrameworkCore.csproj" />
23+
<ProjectReference Include="..\..\src\authorization\CodeBeam.UltimateAuth.Authorization.EntityFrameworkCore\CodeBeam.UltimateAuth.Authorization.EntityFrameworkCore.csproj" />
24+
<ProjectReference Include="..\..\src\credentials\CodeBeam.UltimateAuth.Credentials.EntityFrameworkCore\CodeBeam.UltimateAuth.Credentials.EntityFrameworkCore.csproj" />
25+
<ProjectReference Include="..\..\src\sessions\CodeBeam.UltimateAuth.Sessions.EntityFrameworkCore\CodeBeam.UltimateAuth.Sessions.EntityFrameworkCore.csproj" />
26+
<ProjectReference Include="..\..\src\tokens\CodeBeam.UltimateAuth.Tokens.EntityFrameworkCore\CodeBeam.UltimateAuth.Tokens.EntityFrameworkCore.csproj" />
27+
<ProjectReference Include="..\..\src\users\CodeBeam.UltimateAuth.Users.EntityFrameworkCore\CodeBeam.UltimateAuth.Users.EntityFrameworkCore.csproj" />
28+
</ItemGroup>
29+
30+
<ItemGroup>
31+
<None Include="logo.png" Pack="true" PackagePath="\" />
32+
<None Include="README.md" Pack="true" PackagePath="\" />
2233
</ItemGroup>
2334

2435
</Project>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# UltimateAuth EntityFrameworkCore Bundle
2+
3+
Provides a complete production-ready setup for UltimateAuth using Entity Framework Core.
4+
5+
## 🚀 Quick Start
6+
7+
```csharp
8+
builder.Services
9+
.AddUltimateAuthServer()
10+
.AddUltimateAuthEntityFrameworkCore(options =>
11+
{
12+
options.UseSqlServer("connection-string");
13+
});
14+
```
15+
16+
## 📦 Includes
17+
18+
- Reference domain implementations
19+
20+
EF Core persistence for:
21+
22+
- Users
23+
- Credentials
24+
- Authorization
25+
- Sessions
26+
- Tokens
27+
- Authentication
28+
29+
## ⚠️ Notes
30+
31+
- You must configure a database provider
32+
- Migrations are not applied automatically

0 commit comments

Comments
 (0)