MIT selection Website

SPID login in .NET

italia/spid-aspnetcore

A NuGet library that adds SPID sign-in, Italy’s public digital identity system, to an ASP.NET Core MVC application, handling login, logout and the SAML protocol.

A glowing glass key in the lock of a door framed by blocks, crossed by a beam of light.
Author
italia
Language
C#
Licence
MIT
GitHub stars
48
Last activity
Category
Website

Licence checked on 25/10/2026. Stars and last activity recorded on GitHub on the same date.

Overview

This library is an implementation of RemoteAuthenticationHandler for ASP.NET Core that lets you add SPID authentication to an MVC application. It automates the login and logout flows, SAML protocol handling and security. It adds the /signin-spid and /signout-spid endpoints and provides a TagHelper that renders the “Entra con SPID” button from the list of identity providers fetched from the SPID registry.

The README describes appsettings configuration, extension events, a log handler, dynamic generation of service provider metadata and eIDAS sign-in. It is written in Italian and states that the library was tested by AGID.

Highlights

  • Handles SPID login and logout flows and the SAML protocol in an ASP.NET Core MVC application, through the /signin-spid and /signout-spid endpoints.
  • A spid-providers TagHelper renders the “Entra con SPID” button; the list of identity providers is fetched automatically from the SPID registry at startup.
  • Generation of service provider metadata for six profiles, including public, private, aggregator and operator.
  • eIDAS sign-in supported since version 1.3.0, with a dedicated button.
  • Extension points: events, a request and response log handler, and SpidException errors with an error code.

Who it is for

For .NET teams that need to offer SPID sign-in in an ASP.NET Core MVC application, for example for an online service aimed at Italian citizens.

Installation

Install the NuGet package, then add AddSpid to the authentication setup in Startup.cs and fill in the Spid section of appsettings.json (entity ID, certificate, service indexes). The README provides the code snippets.

Commands

Read the project README before running these commands.

Install-Package SPID.AspNetCore.Authentication

Read the README on GitHub

Points of attention

  • The library targets an ASP.NET Core MVC application; the repository samples must not be used as-is in production, according to the README.
  • With Bootstrap, the SPID button needs an extra CSS rule (box-sizing: content-box) to display correctly.
  • The README is entirely in Italian, with no English version, and flags behaviour changes between versions 1.x, 2.x and 3.x.

Can an agent use it?

A .NET library distributed as a NuGet package. No SKILL.md, AGENTS.md, CLAUDE.md, Cursor rules or MCP server found at the repository root.

Likes and comments

No account needed: one like per browser, which you can remove. Comments are published after review.

This project is hosted by its author: your comments are about this page, not the code. To report an issue with the project, use its repository.

MIT selection

GDPR and AI Act compliance skills

better-isms/grcskills

Around sixty compliance skills (DPIA, AI Act, policies, incidents); a human keeps every decision.

MIT selection

Accessibility audit by the agent

JustasMonkev/mcp-accessibility-scanner

An MCP server that audits a page with axe-core and Playwright, with SKILL.md and .mcp.json.

Made by SOGNI DIGITALI

Complete design system

design-system-builder

One interactive multilingual page plus the design.md file your coding agents read.

A custom skill for your trade?

We also write private skills, in your name. Let's talk about it on a 30-minute call.

Book the free call (30 min)