NuxtIdentity.Core
0.0.8
dotnet add package NuxtIdentity.Core --version 0.0.8
NuGet\Install-Package NuxtIdentity.Core -Version 0.0.8
<PackageReference Include="NuxtIdentity.Core" Version="0.0.8" />
<PackageVersion Include="NuxtIdentity.Core" Version="0.0.8" />
<PackageReference Include="NuxtIdentity.Core" />
paket add NuxtIdentity.Core --version 0.0.8
#r "nuget: NuxtIdentity.Core, 0.0.8"
#:package NuxtIdentity.Core@0.0.8
#addin nuget:?package=NuxtIdentity.Core&version=0.0.8
#tool nuget:?package=NuxtIdentity.Core&version=0.0.8
Nuxt Identity
The Nuxt Identity project aims to be the .NET developer's companion to @sidebase/nuxt-auth. If you're developing a web application with a Nuxt frontend, and a .NET backend, the Nuxt Identity project will provide .NET libraries you can add to your application to get started quickly. Built on ASP.NET Core Identity, this project bridges the gap between .NET and Nuxt for auth and identity.
Why?
Why are we doing this instead of using something that's already out there?
- ๐ฏ Specific niche: .NET Identity works great, but it doesn't "speak nuxt-auth" out of the box
- ๐งน Reduces boilerplate: Developers won't need to figure out JWT token formats, refresh token flows, and endpoint structures that nuxt-auth expects
- ๐ Pre-configured endpoints: Will provide drop-in-ready API controllers that match what nuxt-auth providers expect
- ๐ Type safety bridge: Will include TypeScript types for the frontend that match the backend .NET models
Features
Nuxt Identity aims to be a thin library, focused on moving data between .NET Identity and @sidebase/nuxt-auth. Here's what it's doing:
- ๐ JWT handling: Setting up JWT token creating and validation with security best practices.
- ๐ API endpoints: Supplying the expected endpoints, translating those requests into .NET Identity system calls, and returning the results in the expected form.
- โ ๏ธ Error handling: Surfacing RFC 7807 compliant error responses with ProblemDetails middleware for better API consistency.
- ๐ Structured logging: High-performance logging for authentication events and troubleshooting.
- ๐ค Role/claim visibility: Surfacing user's roles and claims in auth tokens and in the user session.
- ๐ Refresh tokens: .NET Identity doesn't handle refresh tokens at all, so a big part of this libraries work is storing and validating those with automatic rotation.
High-Level Flow
sequenceDiagram
participant User
participant Nuxt as Nuxt Frontend
participant Auth as @sidebase/nuxt-auth (local)
participant API as NuxtIdentity
participant Identity as ASP.NET Core Identity
User->>Nuxt: Enter credentials
Nuxt->>Auth: signIn(credentials)
Auth->>API: POST /api/auth/login
API->>Identity: ValidateUser(credentials)
Identity-->>API: User validated
API-->>Auth: JWT token + user info
Auth-->>Nuxt: Session established
Nuxt-->>User: Logged in
What's coming?
- ๐ฆ NuGet packages developers can drop in
- ๐ Pre-built endpoints matching nuxt-auth's credential/refresh token providers
- ๐ Clear examples for both .NET and Nuxt sides
- โก Minimal config - sensible defaults that "just work"
- ๐ Security best practices baked in
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- System.IdentityModel.Tokens.Jwt (>= 8.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NuxtIdentity.Core:
| Package | Downloads |
|---|---|
|
NuxtIdentity.AspNetCore
ASP.NET Core integration for Nuxt Identity with JWT authentication controllers and middleware |
|
|
NuxtIdentity.EntityFrameworkCore
Entity Framework Core implementation of refresh token storage for Nuxt Identity |
GitHub repositories
This package is not used by any popular GitHub repositories.
969b615 feat!: add GUID key to refresh tokens for safe logging
1c19d96 feat(efcore): add detailed refresh token logging
97a0acc feat!: don't require login for refresh token
3b65e00 fix(core): properly respect token lifespan