<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=MindAttic.Authentication</id>
	<title>MindAttic.Authentication - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=MindAttic.Authentication"/>
	<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;action=history"/>
	<updated>2026-12-06T07:54:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=1912&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=1912&amp;oldid=prev"/>
		<updated>2026-11-30T19:43:52Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:43, 30 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l415&quot;&gt;Line 415:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 415:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/rfc/0001-provisioning-cli|rfc/0001-provisioning-cli]] — M.AUTH-LAW-2 requires that the running app never write production secrets, yet a fresh deployment needs a CSPRNG pepper, a Data-Protection…&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/rfc/0001-provisioning-cli|rfc/0001-provisioning-cli]] — M.AUTH-LAW-2 requires that the running app never write production secrets, yet a fresh deployment needs a CSPRNG pepper, a Data-Protection…&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/SECURITY_SPEC|MindAttic.Authentication — Security Spec (Legion-hardened, red-teamed)]] — net10.0 Razor Class Library, packaged as a NuGet (signing is planned), reads its secrets through configuration under…&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/SECURITY_SPEC|MindAttic.Authentication — Security Spec (Legion-hardened, red-teamed)]] — net10.0 Razor Class Library, packaged as a NuGet (signing is planned), reads its secrets through configuration under…&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/SPEC|MindAttic.Authentication — Product specification]] — &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MindAttic&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Authentication &lt;/del&gt;is &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;one hardened, Vault-backed &lt;/del&gt;sign-in &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;engine shipped as a Razor Class Library (NuGet)&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;so &lt;/del&gt;every MindAttic &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ASP&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;NET…&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/SPEC|MindAttic.Authentication — Product specification]] — &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;In docs/ECOSYSTEM&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;md this &lt;/ins&gt;is &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a platform repo: it owns the &lt;/ins&gt;sign-in &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;concern&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;one hardened auth for &lt;/ins&gt;every MindAttic &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;app that has users&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/VERSIONING|Versioning policy]] — MindAttic.Authentication follows the MindAttic ecosystem whole-number / major-only rule.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/VERSIONING|Versioning policy]] — MindAttic.Authentication follows the MindAttic ecosystem whole-number / major-only rule.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=1709&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=1709&amp;oldid=prev"/>
		<updated>2026-11-30T12:51:53Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:51, 30 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a library, so there is no app to screenshot. Install it as the NuGet package &amp;lt;code&amp;gt;MindAttic.Authentication&amp;lt;/code&amp;gt; from the MindAttic local feed (see [[#Building and testing|Building and testing]]).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a library, so there is no app to screenshot. Install it as the NuGet package &amp;lt;code&amp;gt;MindAttic.Authentication&amp;lt;/code&amp;gt; from the MindAttic local feed (see [[#Building and testing|Building and testing]]).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Scope ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The complete product, every epic, feature and story built or still to build, is in [[MindAttic.Authentication/SPEC|SPEC.md]]. The current finish line, milestone MS-28 &quot;Authentication proven and stable&quot;, is in [[MindAttic.Authentication/RELEASE|RELEASE.md]]; after it come MS-134 (fail-closed wiring and provisioning) and MS-135 (passkeys), the finished product.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Why ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Why ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l411&quot;&gt;Line 411:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 415:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/rfc/0001-provisioning-cli|rfc/0001-provisioning-cli]] — M.AUTH-LAW-2 requires that the running app never write production secrets, yet a fresh deployment needs a CSPRNG pepper, a Data-Protection…&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/rfc/0001-provisioning-cli|rfc/0001-provisioning-cli]] — M.AUTH-LAW-2 requires that the running app never write production secrets, yet a fresh deployment needs a CSPRNG pepper, a Data-Protection…&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/SECURITY_SPEC|MindAttic.Authentication — Security Spec (Legion-hardened, red-teamed)]] — net10.0 Razor Class Library, packaged as a NuGet (signing is planned), reads its secrets through configuration under…&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/SECURITY_SPEC|MindAttic.Authentication — Security Spec (Legion-hardened, red-teamed)]] — net10.0 Razor Class Library, packaged as a NuGet (signing is planned), reads its secrets through configuration under…&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[MindAttic.Authentication/SPEC|MindAttic.Authentication — Product specification]] — MindAttic.Authentication is one hardened, Vault-backed sign-in engine shipped as a Razor Class Library (NuGet), so every MindAttic ASP.NET…&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/VERSIONING|Versioning policy]] — MindAttic.Authentication follows the MindAttic ecosystem whole-number / major-only rule.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/VERSIONING|Versioning policy]] — MindAttic.Authentication follows the MindAttic ecosystem whole-number / major-only rule.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=1332&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=1332&amp;oldid=prev"/>
		<updated>2026-11-29T22:22:13Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:22, 29 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l413&quot;&gt;Line 413:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 413:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/VERSIONING|Versioning policy]] — MindAttic.Authentication follows the MindAttic ecosystem whole-number / major-only rule.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[MindAttic.Authentication/VERSIONING|Versioning policy]] — MindAttic.Authentication follows the MindAttic ecosystem whole-number / major-only rule.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&quot;md2wiki-source&quot;&amp;gt;From [https://github.com/mindattic/MindAttic.Authentication/blob/main/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;README&lt;/del&gt;.md MindAttic.Authentication/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;README&lt;/del&gt;.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&quot;md2wiki-source&quot;&amp;gt;From [https://github.com/mindattic/MindAttic.Authentication/blob/main/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;docs/overview&lt;/ins&gt;.md MindAttic.Authentication/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;docs/overview&lt;/ins&gt;.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MindAttic.Authentication]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MindAttic.Authentication]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=1277&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=1277&amp;oldid=prev"/>
		<updated>2026-11-29T22:15:19Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:15, 29 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l392&quot;&gt;Line 392:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 392:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Instructions for coding agents working in this repo are in &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https://github.com/mindattic/MindAttic.Authentication/blob/main/AGENTS.md &lt;/del&gt;AGENTS.md&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Instructions for coding agents working in this repo are in AGENTS.md.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== License ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== License ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=538&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication&amp;diff=538&amp;oldid=prev"/>
		<updated>2026-11-29T20:25:16Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= MindAttic.Authentication =&lt;br /&gt;
&lt;br /&gt;
Shared authentication for MindAttic&amp;#039;s ASP.NET Core apps as one Razor Class Library: Argon2id passwords, TOTP MFA, secure reset and audit logging, built to OWASP ASVS L2 and NIST SP 800-63B AAL2.&lt;br /&gt;
&lt;br /&gt;
https://img.shields.io/badge/language-C%23-239120.svg https://img.shields.io/badge/.NET-10-512BD4.svg https://img.shields.io/badge/package-Razor%20Class%20Library-5C2D91.svg https://img.shields.io/badge/version-9.0.0-blue.svg https://img.shields.io/badge/tests-224%20passing-brightgreen.svg https://img.shields.io/badge/hashing-Argon2id-555555.svg&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-text&amp;quot;&amp;gt;                       consuming app (Ideas / Prose / Tutor / IdiotProof)&lt;br /&gt;
                                   &amp;amp;#124;  PackageReference (NuGet)&lt;br /&gt;
   +-------------------------------v--------------------------------------+&lt;br /&gt;
   &amp;amp;#124;                    MindAttic.Authentication (RCL, net10.0)           &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;                                                                      &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;  Web/ ........ AddMindAtticAuthentication -&amp;gt; Use... -&amp;gt; Map...Endpoints&amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;   (DI graph)   (ordered middleware)   (/_ma-auth/login,logout,...)   &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;      &amp;amp;#124;                  &amp;amp;#124;                        &amp;amp;#124;                   &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;  Components/ &amp;amp;lt;MaLogin&amp;gt; &amp;amp;lt;MaMfaChallenge&amp;gt; ...  (presentation-only SSR) &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;      &amp;amp;#124;                                                               &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;  Services/ AuthenticationService, MfaEnrollment, PasswordChange,     &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;            PasswordReset, Totp, AccountLockout, AuthAuditWriter,     &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;            PasswordPolicy, UserStore, UserAdmin, AuthBootstrapper    &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;      &amp;amp;#124;              &amp;amp;#124;                &amp;amp;#124;                   &amp;amp;#124;           &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;  Crypto/ Argon2id+PHC   Secrets/ IAuthSecrets   Data/ auth schema    &amp;amp;#124;&lt;br /&gt;
   &amp;amp;#124;   (IPasswordHasher)      (fail-closed)          (IAuthDataContext)   &amp;amp;#124;&lt;br /&gt;
   +-----------&amp;amp;#124;---------------------&amp;amp;#124;------------------------&amp;amp;#124;----------+&lt;br /&gt;
               &amp;amp;#124;                     &amp;amp;#124;                        &amp;amp;#124;&lt;br /&gt;
        Konscious Argon2       IConfiguration           host EF Core DbContext&lt;br /&gt;
        BCrypt (legacy)   (&amp;quot;MindAttic:Vault:Security:*&amp;quot;)  (owns the auth schema)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a library, so there is no app to screenshot. Install it as the NuGet package &amp;lt;code&amp;gt;MindAttic.Authentication&amp;lt;/code&amp;gt; from the MindAttic local feed (see [[#Building and testing|Building and testing]]).&lt;br /&gt;
&lt;br /&gt;
== Why ==&lt;br /&gt;
&lt;br /&gt;
* Stop hand-rolling login in every app: one engine gives MindAttic.Ideas, IdiotProof, Prose and Tutor the same hardened sign-in, MFA, reset and audit trail.&lt;br /&gt;
* Survive a database breach: passwords are Argon2id over a peppered HMAC, so a stolen table alone is not enough to crack them.&lt;br /&gt;
* Give attackers nothing to enumerate: login, MFA and reset answer with the same content and timing whether or not the account exists.&lt;br /&gt;
* Make admins prove it twice: the Admin role is forced through TOTP enrollment before it reaches protected pages.&lt;br /&gt;
* Upgrade old users silently: legacy bcrypt and SHA-256 hashes verify once, then re-hash to Argon2id on the next login.&lt;br /&gt;
* Fail closed, not open: a missing secret or missing production key-ring wiring stops startup instead of running insecurely.&lt;br /&gt;
&lt;br /&gt;
The design came from an adversarial review: seven independent attack lenses (crypto, session, lockout and enumeration, MFA, secrets and Vault, policy and recovery, Blazor and packaging), a synthesized spec, then a red-team pass. The full rationale, control-by-control OWASP and NIST mapping and residual-risk register are in [[MindAttic.Authentication/SECURITY_SPEC|&amp;lt;code&amp;gt;docs/SECURITY_SPEC.md&amp;lt;/code&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The design target, as stated in [[MindAttic.Authentication/BIBLE|docs/BIBLE.md]]: OWASP ASVS L2 (L3 where feasible) and NIST SP 800-63B AAL2, under a threat model that assumes a skilled attacker and a future full database breach. Verified-by-test claims are cited story by story in [https://github.com/mindattic/MindAttic.Authentication/blob/main/docs/USER_STORIES.md &amp;lt;code&amp;gt;docs/USER_STORIES.md&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
=== Password storage ===&lt;br /&gt;
&lt;br /&gt;
* Argon2id (Konscious, RFC 9106) with m=64 MiB, t=3, p=4, a 16-byte salt and a 32-byte hash, over &amp;lt;code&amp;gt;HMAC-SHA256(pepper, NFKC-UTF8(password))&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The pepper is resolved by key id (&amp;lt;code&amp;gt;pepper.v1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;v2&amp;lt;/code&amp;gt;, ...) so it can rotate; hashes are self-describing PHC strings, so &amp;lt;code&amp;gt;NeedsRehash&amp;lt;/code&amp;gt; is deterministic.&lt;br /&gt;
* Legacy bcrypt and SHA-256 hashes verify with the original algorithm once, then silently re-hash to Argon2id plus pepper.&lt;br /&gt;
* A precomputed decoy Argon2id verify runs for absent or inactive accounts so timing does not reveal existence; a &amp;lt;code&amp;gt;SemaphoreSlim&amp;lt;/code&amp;gt; gate caps concurrent hashing (peak RAM is N x 64 MiB).&lt;br /&gt;
&lt;br /&gt;
=== Sessions ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;#95;_Host-MindAttic.Auth&amp;lt;/code&amp;gt; cookie: HttpOnly, &amp;lt;code&amp;gt;Secure=Always&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SameSite=Lax&amp;lt;/code&amp;gt;, 8 h absolute and 30 min idle, no infinite sliding.&lt;br /&gt;
* &amp;lt;code&amp;gt;SecurityStamp&amp;lt;/code&amp;gt; is revalidated every minute on both the HTTP path (&amp;lt;code&amp;gt;CookieValidation&amp;lt;/code&amp;gt;) and the Blazor circuit (&amp;lt;code&amp;gt;MaRevalidatingAuthenticationStateProvider&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code&amp;gt;AuthSession&amp;lt;/code&amp;gt; rows enable per-session revoke, and global logout via stamp rotation.&lt;br /&gt;
* ASP.NET Data Protection uses a per-&amp;lt;code&amp;gt;AppName&amp;lt;/code&amp;gt; key ring; production wiring is fail-closed (startup throws if &amp;lt;code&amp;gt;ConfigureDataProtection&amp;lt;/code&amp;gt; is not supplied).&lt;br /&gt;
&lt;br /&gt;
=== Brute force and enumeration ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AuthLoginThrottle&amp;lt;/code&amp;gt; is a persistent, database-backed exponential backoff keyed per account and per IP. It survives restarts and is shared across instances, with no in-memory state.&lt;br /&gt;
* Login, MFA and reset responses are uniform in content and timing (&amp;lt;code&amp;gt;TimingFloor&amp;lt;/code&amp;gt;) across every outcome.&lt;br /&gt;
&lt;br /&gt;
=== MFA ===&lt;br /&gt;
&lt;br /&gt;
* TOTP (RFC 6238: HMAC-SHA1, 6 digits, 30 s, plus or minus one step), replay-guarded via &amp;lt;code&amp;gt;LastTotpStepUsed&amp;lt;/code&amp;gt;, with verify-before-enable enrollment.&lt;br /&gt;
* Single-use recovery codes, stored only as Argon2id plus pepper hashes.&lt;br /&gt;
* &amp;lt;code&amp;gt;MfaOptions.RequireForAdmin&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) forces the &amp;lt;code&amp;gt;Admin&amp;lt;/code&amp;gt; role through enrollment; the &amp;lt;code&amp;gt;ma:admin&amp;lt;/code&amp;gt; policy requires &amp;lt;code&amp;gt;amr=mfa&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Password policy and reset ===&lt;br /&gt;
&lt;br /&gt;
* NIST-aligned: at least 12 characters, up to 128, all Unicode, no composition rules, no forced rotation.&lt;br /&gt;
* HIBP k-anonymity breach check, fail-open with an audited skip on outage. Password history prevents reuse.&lt;br /&gt;
* Reset tokens are single-use, live at most 15 minutes, are stored only as an HMAC-SHA256 hash and never sign the user in automatically.&lt;br /&gt;
&lt;br /&gt;
=== Secrets ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IAuthSecrets&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ConfigAuthSecrets&amp;lt;/code&amp;gt; read &amp;lt;code&amp;gt;MindAttic:Vault:Security:&amp;amp;lt;name&amp;gt;&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;IConfiguration&amp;lt;/code&amp;gt; and throw rather than return empty on a missing or blank value. Since 4.0.0 a lookup also matches names that Azure App Service on Linux rewrites when it turns settings into environment variables (for example a dot or hyphen removed): an exact match first, then a letters-and-digits comparison, and two keys that differ only by punctuation raise an ambiguity error instead of a guess.&lt;br /&gt;
&lt;br /&gt;
=== Auth email ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;AddMindAtticAuthentication&amp;lt;/code&amp;gt; registers auth email delivery. When &amp;lt;code&amp;gt;MindAttic:Vault:Notifications:email&amp;lt;/code&amp;gt; (the MindAttic.Vault &amp;lt;code&amp;gt;Notifications&amp;lt;/code&amp;gt; format: &amp;lt;code&amp;gt;smtpHost&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;smtpPort&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;password&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;from&amp;lt;/code&amp;gt;) is complete, &amp;lt;code&amp;gt;SmtpAuthEmailSender&amp;lt;/code&amp;gt; delivers reset links and security alerts over SMTP with MailKit: TLS is required (465 implicit, otherwise STARTTLS), sends are queued so a reset request never waits on the mail server, each message gets three attempts, and logs never carry the link or the password. The library also raises security alerts through the same sender (&amp;lt;code&amp;gt;IAuthSecurityAlerts&amp;lt;/code&amp;gt;): password changed, password reset (link or administrator), two-step verification turned on, recovery code used to sign in, repeated failed sign-ins (once per run, known active accounts only), new-device sign-in (neither the browser nor the network seen before), email changed (sent to the old address) and account deactivated. Alerts never carry a password, token, code or raw IP, and a failed alert never fails the account change. Otherwise the log-only &amp;lt;code&amp;gt;LoggingAuthEmailSender&amp;lt;/code&amp;gt; stays in place and a startup warning says email will not be delivered, naming any missing field. A reset link must be absolute, so &amp;lt;code&amp;gt;MindAttic:Auth:Reset:PublicBaseUrl&amp;lt;/code&amp;gt; has to be set too. A host&amp;#039;s own &amp;lt;code&amp;gt;IAuthEmailSender&amp;lt;/code&amp;gt; overrides both.&lt;br /&gt;
&lt;br /&gt;
=== Organizations (opt-in) ===&lt;br /&gt;
&lt;br /&gt;
Apps that serve several customers can give users &amp;lt;strong&amp;gt;memberships&amp;lt;/strong&amp;gt; in &amp;lt;strong&amp;gt;organizations&amp;lt;/strong&amp;gt;, each with an app-defined role string. It is opt-in: an app that never calls &amp;lt;code&amp;gt;AddMindAtticOrganizations&amp;lt;/code&amp;gt; gets no new tables, services or claims. See [[MindAttic.Authentication/ORGANIZATIONS|docs/ORGANIZATIONS.md]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AuthOrganization&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AuthMembership&amp;lt;/code&amp;gt; live in the &amp;lt;code&amp;gt;auth&amp;lt;/code&amp;gt; schema (&amp;lt;code&amp;gt;ApplyMindAtticAuthConfiguration(organizations: true)&amp;lt;/code&amp;gt;); the host&amp;#039;s &amp;lt;code&amp;gt;DbContext&amp;lt;/code&amp;gt; implements &amp;lt;code&amp;gt;IOrganizationDataContext&amp;lt;/code&amp;gt; and adds its own migration.&lt;br /&gt;
* &amp;lt;code&amp;gt;IOrganizationService&amp;lt;/code&amp;gt;: create an organization, add / remove / restore a member, set a role, list a user&amp;#039;s memberships and an organization&amp;#039;s members. Every change writes an &amp;lt;code&amp;gt;AuthOrganizationAudit&amp;lt;/code&amp;gt; row in the same save.&lt;br /&gt;
* Owner protection (only an owner grants, changes or removes the owner role; at least one active owner stays) and sign-out of the affected user&amp;#039;s sessions on a role change or removal.&lt;br /&gt;
* Memberships are stamped on the sign-in cookie, one &amp;lt;code&amp;gt;ma:org&amp;lt;/code&amp;gt; claim per membership (&amp;lt;code&amp;gt;{organizationId:N}&amp;amp;#124;{role}&amp;lt;/code&amp;gt;; the claim type is configurable).&lt;br /&gt;
* Email invitations (&amp;lt;code&amp;gt;IInvitationService&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaAcceptInvitation&amp;lt;/code&amp;gt;): single-use hashed expiring tokens, resend and revoke, bulk CSV, enumeration-safe, the invitee sets a password and enrolls MFA when the role requires it. See [[MindAttic.Authentication/ORGANIZATIONS|docs/ORGANIZATIONS.md]].&lt;br /&gt;
* Per-role MFA: roles listed in &amp;lt;code&amp;gt;MfaRequiredRoles&amp;lt;/code&amp;gt; flag the user to enroll an authenticator, and a session holding such a membership without an MFA sign-in is sent to MFA setup.&lt;br /&gt;
&lt;br /&gt;
=== Packaging ===&lt;br /&gt;
&lt;br /&gt;
* Endpoints, never components, own &amp;lt;code&amp;gt;SignInAsync&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SignOutAsync&amp;lt;/code&amp;gt;; every POST is antiforgery-protected.&lt;br /&gt;
* A scoped CSP nonce applies only to the auth surface, so it never clobbers the host app&amp;#039;s own CSP.&lt;br /&gt;
* &amp;lt;code&amp;gt;#if MA_DEV_AUTH&amp;lt;/code&amp;gt; gates the dev-only localhost auth bypass; the symbol is defined only under &amp;lt;code&amp;gt;Configuration == &amp;#039;Debug&amp;#039;&amp;lt;/code&amp;gt;, so it compiles out of Release builds entirely.&lt;br /&gt;
&lt;br /&gt;
== Quick start ==&lt;br /&gt;
&lt;br /&gt;
Reference the package (consumers pin an exact whole-number version):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-xml&amp;quot;&amp;gt;&amp;amp;lt;PackageReference Include=&amp;quot;MindAttic.Authentication&amp;quot; Version=&amp;quot;9.0.0&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wire it up in &amp;lt;code&amp;gt;Program.cs&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-csharp&amp;quot;&amp;gt;builder.Services.AddMindAtticAuthentication&amp;amp;lt;AppDbContext&amp;gt;(builder.Configuration, o =&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    o.AppName = &amp;quot;Ideas&amp;quot;;                       // per-app Data Protection trust boundary&lt;br /&gt;
    o.IsProduction = builder.Environment.IsProduction();&lt;br /&gt;
    o.ConfigureDataProtection = dp =&amp;gt; dp        // REQUIRED in prod: fail-closed if omitted&lt;br /&gt;
        .PersistKeysToAzureBlobStorage(blobUri, credential)&lt;br /&gt;
        .ProtectKeysWithAzureKeyVault(keyVaultKeyUri, credential);&lt;br /&gt;
    o.ConfigureAdditionalPolicies = ab =&amp;gt;&lt;br /&gt;
        ab.AddPolicy(&amp;quot;CanEditPosts&amp;quot;, p =&amp;gt; p.RequireRole(&amp;quot;Editor&amp;quot;));&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
var app = builder.Build();&lt;br /&gt;
&lt;br /&gt;
app.UseForwardedHeaders();                      // BEFORE UseMindAtticAuthentication&lt;br /&gt;
app.UseMindAtticAuthentication();               // authn -&amp;gt; [dev bypass, Debug-only] -&amp;gt; authz -&amp;gt; forced-step -&amp;gt; CSP nonce&lt;br /&gt;
app.MapMindAtticAuthEndpoints(group =&amp;gt;&lt;br /&gt;
    group.RequireRateLimiting(&amp;quot;auth&amp;quot;));         // /_ma-auth/login, /mfa-challenge, /logout, /change-password, /reset/*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Implement the data seam on your own &amp;lt;code&amp;gt;DbContext&amp;lt;/code&amp;gt; and apply the owned schema:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-csharp&amp;quot;&amp;gt;public class AppDbContext : DbContext, IAuthDataContext&lt;br /&gt;
{&lt;br /&gt;
    public DbSet&amp;amp;lt;AuthUser&amp;gt; AuthUsers =&amp;gt; Set&amp;amp;lt;AuthUser&amp;gt;();&lt;br /&gt;
    public DbSet&amp;amp;lt;AuthUserMfa&amp;gt; AuthUserMfa =&amp;gt; Set&amp;amp;lt;AuthUserMfa&amp;gt;();&lt;br /&gt;
    public DbSet&amp;amp;lt;AuthRecoveryCode&amp;gt; AuthRecoveryCodes =&amp;gt; Set&amp;amp;lt;AuthRecoveryCode&amp;gt;();&lt;br /&gt;
    public DbSet&amp;amp;lt;AuthSession&amp;gt; AuthSessions =&amp;gt; Set&amp;amp;lt;AuthSession&amp;gt;();&lt;br /&gt;
    public DbSet&amp;amp;lt;AuthLoginThrottle&amp;gt; AuthLoginThrottles =&amp;gt; Set&amp;amp;lt;AuthLoginThrottle&amp;gt;();&lt;br /&gt;
    public DbSet&amp;amp;lt;AuthAuditLog&amp;gt; AuthAuditLog =&amp;gt; Set&amp;amp;lt;AuthAuditLog&amp;gt;();&lt;br /&gt;
    public DbSet&amp;amp;lt;AuthPasswordHistory&amp;gt; AuthPasswordHistory =&amp;gt; Set&amp;amp;lt;AuthPasswordHistory&amp;gt;();&lt;br /&gt;
    public DbSet&amp;amp;lt;AuthPasswordResetToken&amp;gt; AuthPasswordResetTokens =&amp;gt; Set&amp;amp;lt;AuthPasswordResetToken&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
    protected override void OnModelCreating(ModelBuilder b)&lt;br /&gt;
        =&amp;gt; b.ApplyMindAtticAuthConfiguration();   // owns the isolated auth schema; the app runs its own migration&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Drop the components into your pages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-razor&amp;quot;&amp;gt;@* /login *@&lt;br /&gt;
&amp;amp;lt;MaLogin ReturnUrl=&amp;quot;@ReturnUrl&amp;quot; Error=&amp;quot;@(Request.Query[&amp;quot;error&amp;quot;] == &amp;quot;1&amp;quot;)&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@* /mfa *@&lt;br /&gt;
&amp;amp;lt;MaMfaChallenge ReturnUrl=&amp;quot;@ReturnUrl&amp;quot; Error=&amp;quot;@(Request.Query[&amp;quot;error&amp;quot;] == &amp;quot;1&amp;quot;)&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@* anywhere authenticated *@&lt;br /&gt;
&amp;amp;lt;MaLogout Text=&amp;quot;Sign out&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then provide the required secrets through your configuration provider under &amp;lt;code&amp;gt;MindAttic:Vault:Security&amp;lt;/code&amp;gt; (see [[MindAttic.Authentication/CONFIGURATION|docs/CONFIGURATION.md]]). The full step-by-step walkthrough, including email and user migration, is [[MindAttic.Authentication/INTEGRATION|docs/INTEGRATION.md]].&lt;br /&gt;
&lt;br /&gt;
Each app keeps its own &amp;lt;code&amp;gt;DbContext&amp;lt;/code&amp;gt; and connection and brands the components through its own markup around them; the components take only a small typed parameter set (&amp;lt;code&amp;gt;ReturnUrl&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Error&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Sent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Token&amp;lt;/code&amp;gt;; see [[MindAttic.Authentication/API|docs/API.md]]). Apps stay separate trust boundaries: &amp;lt;code&amp;gt;SetApplicationName&amp;lt;/code&amp;gt; scopes Data Protection per &amp;lt;code&amp;gt;AppName&amp;lt;/code&amp;gt;, so a cookie minted for one app cannot authenticate another.&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
&lt;br /&gt;
The host owns its &amp;lt;code&amp;gt;DbContext&amp;lt;/code&amp;gt; and connection string; this library never opens a connection itself. It configures the &amp;lt;code&amp;gt;auth&amp;lt;/code&amp;gt; schema onto the host&amp;#039;s model via &amp;lt;code&amp;gt;ApplyMindAtticAuthConfiguration()&amp;lt;/code&amp;gt; and works through the host-implemented &amp;lt;code&amp;gt;IAuthDataContext&amp;lt;/code&amp;gt; seam.&lt;br /&gt;
&lt;br /&gt;
What it is: one hardened auth engine consumed as a NuGet &amp;lt;code&amp;gt;PackageReference&amp;lt;/code&amp;gt;, owning its own &amp;lt;code&amp;gt;auth&amp;lt;/code&amp;gt; EF schema, its own cookie and Data Protection scheme, and presentation-only Razor components.&lt;br /&gt;
&lt;br /&gt;
What it is not: a cross-app SSO or identity provider (no shared session across apps), a secrets store (it consumes secrets through configuration), WebAuthn or FIDO2 (deferred to a future major), or semver. The canonical statement is [[MindAttic.Authentication/BIBLE|docs/BIBLE.md]], sections 1 to 3.&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
The member-by-member reference is [[MindAttic.Authentication/API|docs/API.md]]; this is its shape.&lt;br /&gt;
&lt;br /&gt;
=== Web wiring ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Member&lt;br /&gt;
! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;AddMindAtticAuthentication&amp;amp;lt;TContext&amp;gt;(services, configuration, configure)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Registers the full DI graph: floor-validated, fail-closed options; crypto and secrets; per-request services; cookie and MFA-pending auth schemes; the &amp;lt;code&amp;gt;ma:admin&amp;lt;/code&amp;gt; policy; per-app Data Protection key ring; Blazor cascading auth state. &amp;lt;code&amp;gt;TContext&amp;lt;/code&amp;gt; is a &amp;lt;code&amp;gt;DbContext&amp;lt;/code&amp;gt; that implements &amp;lt;code&amp;gt;IAuthDataContext&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;UseMindAtticAuthentication(app)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Orders &amp;lt;code&amp;gt;UseAuthentication&amp;lt;/code&amp;gt;, the Debug-only dev bypass, &amp;lt;code&amp;gt;UseAuthorization&amp;lt;/code&amp;gt;, a forced-step redirect (must enroll MFA or must change password), then a scoped CSP nonce applied only to &amp;lt;code&amp;gt;/login&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/mfa&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/account&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/_ma-auth&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MapMindAtticAuthEndpoints(endpoints, configureGroup)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Maps the &amp;lt;code&amp;gt;/_ma-auth&amp;lt;/code&amp;gt; group below; the optional &amp;lt;code&amp;gt;configureGroup&amp;lt;/code&amp;gt; lets a host attach rate limiting.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Endpoints ===&lt;br /&gt;
&lt;br /&gt;
Every POST validates antiforgery; login, MFA and reset paths run behind a uniform timing floor (&amp;lt;code&amp;gt;Web/AuthEndpoints.cs&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Route&lt;br /&gt;
! Method&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/_ma-auth/login&amp;lt;/code&amp;gt;&lt;br /&gt;
| POST&lt;br /&gt;
| Credential verify, decoy timing on failure, then issues the cookie or redirects to &amp;lt;code&amp;gt;/mfa&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/_ma-auth/mfa-challenge&amp;lt;/code&amp;gt;&lt;br /&gt;
| POST&lt;br /&gt;
| Consumes the MFA-pending principal, checks a TOTP or recovery code, issues the real cookie.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/_ma-auth/logout&amp;lt;/code&amp;gt;&lt;br /&gt;
| POST&lt;br /&gt;
| Revokes the current &amp;lt;code&amp;gt;AuthSession&amp;lt;/code&amp;gt; and signs out.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/_ma-auth/change-password&amp;lt;/code&amp;gt;&lt;br /&gt;
| POST&lt;br /&gt;
| Requires authorization.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/_ma-auth/reset/request&amp;lt;/code&amp;gt;&lt;br /&gt;
| POST&lt;br /&gt;
| Enumeration-safe: the same response and timing whether or not the account exists.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/_ma-auth/reset/confirm&amp;lt;/code&amp;gt;&lt;br /&gt;
| POST&lt;br /&gt;
| Consumes a reset token and sets the new password; never auto-logs-in.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Razor components ===&lt;br /&gt;
&lt;br /&gt;
All are presentation-only static-SSR forms with an antiforgery token, and none calls &amp;lt;code&amp;gt;SignInAsync&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;MaLogin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaLogout&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaChangePassword&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaMfaChallenge&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaMfaSetup&amp;lt;/code&amp;gt; (interactive: enrollment plus one-time recovery-code display), &amp;lt;code&amp;gt;MaForgotPassword&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaResetPassword&amp;lt;/code&amp;gt;, and (opt-in organizations) &amp;lt;code&amp;gt;MaAcceptInvitation&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Data seam ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IAuthDataContext&amp;lt;/code&amp;gt; exposes eight &amp;lt;code&amp;gt;DbSet&amp;lt;/code&amp;gt; properties over the &amp;lt;code&amp;gt;auth&amp;lt;/code&amp;gt; schema (&amp;lt;code&amp;gt;AuthModel.DefaultSchema&amp;lt;/code&amp;gt;), applied via &amp;lt;code&amp;gt;ApplyMindAtticAuthConfiguration()&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;AuthModel.ModelFingerprint&amp;lt;/code&amp;gt; is currently &amp;lt;code&amp;gt;&amp;quot;auth-v2&amp;quot;&amp;lt;/code&amp;gt;, so a host can assert its migration matches.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Options bind from &amp;lt;code&amp;gt;IConfiguration&amp;lt;/code&amp;gt;. Every key, secret and default, with an example &amp;lt;code&amp;gt;appsettings.json&amp;lt;/code&amp;gt;, is in [[MindAttic.Authentication/CONFIGURATION|docs/CONFIGURATION.md]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Section&lt;br /&gt;
! Highlights&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;AuthCryptoOptions&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic:Auth:Crypto&amp;lt;/code&amp;gt;&lt;br /&gt;
| Argon2 memory, time and parallelism; salt and hash sizes; password length bounds; current pepper key id. &amp;lt;code&amp;gt;ValidateOrThrow()&amp;lt;/code&amp;gt; enforces OWASP floors at startup.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;AuthPolicyOptions&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic:Auth:Policy&amp;lt;/code&amp;gt;&lt;br /&gt;
| Min and max length, HIBP check and fail-open, password history depth (default 5).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;AuthSessionOptions&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic:Auth:Session&amp;lt;/code&amp;gt;&lt;br /&gt;
| Absolute timeout (8 h), idle timeout (30 min), revalidation interval (1 min).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MfaOptions&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic:Auth:Mfa&amp;lt;/code&amp;gt;&lt;br /&gt;
| TOTP issuer, digits, period and window; recovery-code count and size; &amp;lt;code&amp;gt;RequireForAdmin&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;AuthResetOptions&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic:Auth:Reset&amp;lt;/code&amp;gt;&lt;br /&gt;
| Public base URL, reset path, token TTL (15 min), emails-per-hour cap (3).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Secrets are read from &amp;lt;code&amp;gt;MindAttic:Vault:Security:&amp;amp;lt;name&amp;gt;&amp;lt;/code&amp;gt; and the library fails closed when one is missing. Optional SMTP settings for auth email are read from &amp;lt;code&amp;gt;MindAttic:Vault:Notifications:email&amp;lt;/code&amp;gt;. How to provision and rotate them is in [[MindAttic.Authentication/OPERATIONS|docs/OPERATIONS.md]].&lt;br /&gt;
&lt;br /&gt;
== Project layout ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-text&amp;quot;&amp;gt;MindAttic.Authentication/&lt;br /&gt;
├─ src/MindAttic.Authentication/          RCL, net10.0, packed to NuGet&lt;br /&gt;
│  ├─ Components/    7 presentation-only Razor forms (MaLogin, MaLogout, MaChangePassword,&lt;br /&gt;
│  │                 MaMfaChallenge, MaMfaSetup, MaForgotPassword, MaResetPassword)&lt;br /&gt;
│  ├─ Crypto/        Argon2idPasswordHasher, IPasswordHasher, Phc (PHC codec)&lt;br /&gt;
│  ├─ Data/          AuthModel (EF config owning the auth schema), IAuthDataContext&lt;br /&gt;
│  ├─ Entities/      AuthEntities.cs: the 8 owned tables + enums&lt;br /&gt;
│  ├─ Internal/      AuthKeys, TimingFloor, UrlSafety: implementation detail, not covered&lt;br /&gt;
│  │                 by the cross-version API stability promise (see docs/VERSIONING.md)&lt;br /&gt;
│  ├─ Options/       AuthCryptoOptions, AuthPolicyOptions, AuthResetOptions,&lt;br /&gt;
│  │                 AuthSessionOptions, MfaOptions, PasswordPolicyDescriptor&lt;br /&gt;
│  ├─ Secrets/       IAuthSecrets, ConfigAuthSecrets (fail-closed config-based secret access)&lt;br /&gt;
│  ├─ Services/      AccountLockoutService, AuthAuditWriter, AuthBootstrapper,&lt;br /&gt;
│  │                 AuthenticationService, IAuthEmailSender, SmtpAuthEmailSender,&lt;br /&gt;
│  │                 AuthEmailSettings, AuthEmailStartup, LoggingAuthEmailSender (fallback),&lt;br /&gt;
│  │                 MfaEnrollmentService, PasswordChangeService, PasswordPolicy,&lt;br /&gt;
│  │                 PasswordResetService, TotpService, UserAdminService, UserStore&lt;br /&gt;
│  ├─ Web/           MindAtticAuthExtensions (DI), MindAtticAuthAppExtensions (middleware),&lt;br /&gt;
│  │                 AuthEndpoints (/_ma-auth/*), CookieValidation, IMaClaimsAugmentor,&lt;br /&gt;
│  │                 MaRevalidatingAuthenticationStateProvider, DevAuthBypass (#if MA_DEV_AUTH)&lt;br /&gt;
│  └─ MaClaims.cs    claim type, role, policy and scheme-name constants&lt;br /&gt;
├─ tests/MindAttic.Authentication.Tests/   NUnit 4 suite&lt;br /&gt;
├─ tools/            codex.ps1 (Codex doctor/digest), build-readme.ps1 (README.htm)&lt;br /&gt;
├─ docs/             Codex canon + detail docs (see Documentation)&lt;br /&gt;
└─ MindAttic.Authentication.sln / .slnx&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-powershell&amp;quot;&amp;gt;# There is both a .sln and a .slnx at the root, so name one explicitly;&lt;br /&gt;
# plain `dotnet build` fails with MSB1011.&lt;br /&gt;
dotnet build MindAttic.Authentication.sln -c Debug&lt;br /&gt;
&lt;br /&gt;
# NUnit 4 suite&lt;br /&gt;
dotnet test MindAttic.Authentication.sln -c Debug&lt;br /&gt;
&lt;br /&gt;
# Pack into the shared local feed&lt;br /&gt;
dotnet pack src/MindAttic.Authentication/MindAttic.Authentication.csproj -c Release -o C:\LocalNuGet&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;nuget.config&amp;lt;/code&amp;gt; points restore at two sources: a &amp;lt;code&amp;gt;LocalNuGet&amp;lt;/code&amp;gt; feed (&amp;lt;code&amp;gt;C:\LocalNuGet&amp;lt;/code&amp;gt;) and nuget.org. Because &amp;lt;code&amp;gt;MA_DEV_AUTH&amp;lt;/code&amp;gt; is defined only for &amp;lt;code&amp;gt;Debug&amp;lt;/code&amp;gt;, a &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt; pack never contains the dev-only localhost auth bypass: pack &amp;lt;code&amp;gt;Debug&amp;lt;/code&amp;gt; only for a local dev feed and &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt; for anything a real app will reference.&lt;br /&gt;
&lt;br /&gt;
A release is not done until every subscriber&amp;#039;s &amp;lt;code&amp;gt;PackageReference&amp;lt;/code&amp;gt; is bumped and rebuilds; see [[MindAttic.Authentication/BIBLE|docs/BIBLE.md]] (&amp;lt;code&amp;gt;M.AUTH-LAW-7&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Whole-number, major-only: &amp;lt;code&amp;gt;1.0.0&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;2.0.0&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;3.0.0&amp;lt;/code&amp;gt;, and so on; minor and patch are always &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. The current &amp;lt;code&amp;gt;&amp;amp;lt;Version&amp;gt;&amp;lt;/code&amp;gt; in the csproj is &amp;lt;code&amp;gt;9.0.0&amp;lt;/code&amp;gt;. Consumers exact-pin. Crypto agility (Argon2 cost, pepper rotation) is in-band through configuration and &amp;lt;code&amp;gt;NeedsRehash&amp;lt;/code&amp;gt;, not a version bump. Full policy: [[MindAttic.Authentication/VERSIONING|docs/VERSIONING.md]].&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
Checked against this working tree on 2026-10-03:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;dotnet test MindAttic.Authentication.slnx -c Debug&amp;lt;/code&amp;gt;: 224 of 224 tests pass (NUnit 4, net10.0).&lt;br /&gt;
* Package version &amp;lt;code&amp;gt;6.0.0&amp;lt;/code&amp;gt;: SMTP auth email with security alerts on account events (see Auth email); no &amp;lt;code&amp;gt;MindAttic.Vault&amp;lt;/code&amp;gt; package dependency.&lt;br /&gt;
* Four sibling apps use the package, all at 6.0.0: MindAttic.Ideas, IdiotProof, Prose and Tutor (see [[MindAttic.Authentication/BIBLE|docs/BIBLE.md]] section 4.1a).&lt;br /&gt;
* Each consumer gets SMTP auth email once its &amp;lt;code&amp;gt;Notifications&amp;lt;/code&amp;gt; SMTP settings are configured. MindAttic.Ideas and Tutor host &amp;lt;code&amp;gt;/forgot-password&amp;lt;/code&amp;gt; and the &amp;lt;code&amp;gt;/account/reset&amp;lt;/code&amp;gt; page and set &amp;lt;code&amp;gt;PublicBaseUrl&amp;lt;/code&amp;gt;; IdiotProof deliberately keeps production self-service reset off, and Prose has no web sign-in.&lt;br /&gt;
* There is no &amp;lt;code&amp;gt;MindAttic.Vault&amp;lt;/code&amp;gt; package reference: secrets and SMTP settings resolve through plain &amp;lt;code&amp;gt;IConfiguration&amp;lt;/code&amp;gt; by naming convention, and a host wires its own Vault-backed (or any) configuration provider that fills those sections.&lt;br /&gt;
* Compiles and is exercised indirectly, but has no dedicated unit test of its own: the &amp;lt;code&amp;gt;AuthenticationService&amp;lt;/code&amp;gt; login and MFA-confirm pipeline, &amp;lt;code&amp;gt;MfaEnrollmentService&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PasswordChangeService&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AuthBootstrapper&amp;lt;/code&amp;gt;, the Web DI, middleware and endpoint wiring, the revalidating auth-state provider, and the seven Razor components. See [https://github.com/mindattic/MindAttic.Authentication/blob/main/docs/USER_STORIES.md &amp;lt;code&amp;gt;docs/USER_STORIES.md&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
== Roadmap ==&lt;br /&gt;
&lt;br /&gt;
Planned, not built:&lt;br /&gt;
&lt;br /&gt;
* The provisioning CLI for generating the pepper, Data Protection KEK and reset-token key ([[MindAttic.Authentication/rfc/0001-provisioning-cli|docs/rfc/0001-provisioning-cli.md]]).&lt;br /&gt;
* A signed, deterministic pack with a committed &amp;lt;code&amp;gt;packages.lock.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
* WebAuthn and FIDO2 (additive, non-breaking when it lands).&lt;br /&gt;
&lt;br /&gt;
== Accepted risks ==&lt;br /&gt;
&lt;br /&gt;
* MFA is TOTP plus recovery codes for now; adversary-in-the-middle session relay against TOTP is the accepted residual until WebAuthn lands.&lt;br /&gt;
* Legacy hashes upgrade to Argon2id plus pepper on the next successful login; dormant accounts get a forced reset rather than an indefinite weak-hash residual.&lt;br /&gt;
* HIBP is fail-open online with a bundled offline fallback and an audited skip, so an HIBP outage never blocks password changes.&lt;br /&gt;
* The apps stay separate trust boundaries; there is no cross-app SSO.&lt;br /&gt;
* Other accepted residuals (pepper and KEK in process memory, a Vault or configuration outage becoming a fail-closed auth outage, the 60-second stale-principal window, the operator-gated MFA-reset channel, distributed low-and-slow credential stuffing under per-scope thresholds) are listed with mitigations in [[MindAttic.Authentication/SECURITY_SPEC|&amp;lt;code&amp;gt;docs/SECURITY_SPEC.md&amp;lt;/code&amp;gt;]], section 8.&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
This repo follows the MindAttic Codex documentation standard; a fact lives in exactly one layer.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Doc&lt;br /&gt;
! Layer&lt;br /&gt;
! What it covers&lt;br /&gt;
|-&lt;br /&gt;
| [[MindAttic.Authentication/BIBLE|docs/BIBLE.md]]&lt;br /&gt;
| L0&lt;br /&gt;
| What the system is and is not, architecture, the Laws, verified state&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mindattic/MindAttic.Authentication/blob/main/docs/AMENDMENTS.md docs/AMENDMENTS.md]&lt;br /&gt;
| L1&lt;br /&gt;
| Pending decisions not yet folded into the bible (normally empty)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mindattic/MindAttic.Authentication/blob/main/docs/USER_STORIES.md &amp;lt;code&amp;gt;docs/USER_STORIES.md&amp;lt;/code&amp;gt;]&lt;br /&gt;
| L2&lt;br /&gt;
| Every story cites its verifying NUnit test&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mindattic/MindAttic.Authentication/tree/main/docs/rfc docs/rfc/]&lt;br /&gt;
| rfc&lt;br /&gt;
| Design notes not yet graduated (currently the provisioning-CLI proposal)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mindattic/MindAttic.Authentication/blob/main/docs/BIBLE.digest.md docs/BIBLE.digest.md]&lt;br /&gt;
| generated&lt;br /&gt;
| Produced by &amp;lt;code&amp;gt;tools/codex.ps1 digest&amp;lt;/code&amp;gt;; never hand-edited&lt;br /&gt;
|-&lt;br /&gt;
| [[MindAttic.Authentication/SECURITY_SPEC|&amp;lt;code&amp;gt;docs/SECURITY_SPEC.md&amp;lt;/code&amp;gt;]]&lt;br /&gt;
| detail&lt;br /&gt;
| Red-teamed design rationale; full control, OWASP and NIST mapping&lt;br /&gt;
|-&lt;br /&gt;
| [[MindAttic.Authentication/API|docs/API.md]]&lt;br /&gt;
| detail&lt;br /&gt;
| Exhaustive public API reference&lt;br /&gt;
|-&lt;br /&gt;
| [[MindAttic.Authentication/INTEGRATION|docs/INTEGRATION.md]]&lt;br /&gt;
| detail&lt;br /&gt;
| Step-by-step host adoption&lt;br /&gt;
|-&lt;br /&gt;
| [[MindAttic.Authentication/CONFIGURATION|docs/CONFIGURATION.md]]&lt;br /&gt;
| detail&lt;br /&gt;
| Every config key, secret and option, with an example appsettings.json&lt;br /&gt;
|-&lt;br /&gt;
| [[MindAttic.Authentication/OPERATIONS|docs/OPERATIONS.md]]&lt;br /&gt;
| detail&lt;br /&gt;
| Runbook: provisioning, bootstrap, rotation, disaster recovery, email, deployment&lt;br /&gt;
|-&lt;br /&gt;
| [[MindAttic.Authentication/VERSIONING|docs/VERSIONING.md]]&lt;br /&gt;
| detail&lt;br /&gt;
| The major-only versioning policy&lt;br /&gt;
|-&lt;br /&gt;
| [[MindAttic.Authentication/README|docs/README.md]]&lt;br /&gt;
| index&lt;br /&gt;
| Index of the detail docs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Instructions for coding agents working in this repo are in [https://github.com/mindattic/MindAttic.Authentication/blob/main/AGENTS.md AGENTS.md].&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
This repository has no LICENSE file. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Part of [https://mindattic.com MindAttic] — see more projects at [https://github.com/mindattic github.com/mindattic]. Related: [[MindAttic.Vault|MindAttic.Vault]], [https://github.com/mindattic/MindAttic.Ideas MindAttic.Ideas], [[IdiotProof|IdiotProof]], [[Prose|Prose]], [[Tutor|Tutor]].&lt;br /&gt;
&lt;br /&gt;
== Pages in this repository ==&lt;br /&gt;
* [[MindAttic.Authentication/API|MindAttic.Authentication — Public API Reference]] — Exhaustive reference for every public type the library exposes (namespace MindAttic.Authentication.*). For the why behind each control see…&lt;br /&gt;
* [[MindAttic.Authentication/BIBLE|MindAttic.Authentication — Project Bible]] — MindAttic.Authentication is a maximally-secure, Vault-backed authentication engine shipped as a single Razor Class Library (NuGet) so…&lt;br /&gt;
* [[MindAttic.Authentication/CONFIGURATION|Configuration reference]] — Everything is secure-by-default: the only things you must supply are the Vault secrets and (in prod) the Data Protection key-ring wiring.…&lt;br /&gt;
* [[MindAttic.Authentication/INTEGRATION|Integrating MindAttic.Authentication into an app]] — A consuming app keeps its own DbContext, connection string, and deployment. It gains hardened auth by (1) referencing the package, (2)…&lt;br /&gt;
* [[MindAttic.Authentication/OPERATIONS|Operations runbook]] — Provisioning, rotation, disaster recovery, email, and deployment for MindAttic.Authentication. These are operator/IaC responsibilities —…&lt;br /&gt;
* [[MindAttic.Authentication/ORGANIZATIONS|Organizations and memberships (opt-in)]] — Added in 8.0.0 (M.AUTH-T34). Multi-tenant apps give users memberships in organizations, each with an app-defined role string. The feature…&lt;br /&gt;
* [[MindAttic.Authentication/README|MindAttic.Authentication — Documentation]] — Exhaustive docs for the shared authentication library used by MindAttic.Ideas, IdiotProof, Prose and Tutor. Start with the root…&lt;br /&gt;
* [[MindAttic.Authentication/RELEASE|MindAttic.Authentication — Release charter]] — A Razor Class Library that gives MindAttic&amp;#039;s ASP.NET Core apps (Gadfly, IdeaCms, IdiotProof, Prose, ThinkTank, Tutor) one hardened…&lt;br /&gt;
* [[MindAttic.Authentication/rfc/0001-provisioning-cli|rfc/0001-provisioning-cli]] — M.AUTH-LAW-2 requires that the running app never write production secrets, yet a fresh deployment needs a CSPRNG pepper, a Data-Protection…&lt;br /&gt;
* [[MindAttic.Authentication/SECURITY_SPEC|MindAttic.Authentication — Security Spec (Legion-hardened, red-teamed)]] — net10.0 Razor Class Library, packaged as a NuGet (signing is planned), reads its secrets through configuration under…&lt;br /&gt;
* [[MindAttic.Authentication/VERSIONING|Versioning policy]] — MindAttic.Authentication follows the MindAttic ecosystem whole-number / major-only rule.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-source&amp;quot;&amp;gt;From [https://github.com/mindattic/MindAttic.Authentication/blob/main/README.md MindAttic.Authentication/README.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:MindAttic.Authentication]]&lt;/div&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
</feed>