Umbraco.Community.SuperSecretLoginButton 0.1.0

dotnet add package Umbraco.Community.SuperSecretLoginButton --version 0.1.0
                    
NuGet\Install-Package Umbraco.Community.SuperSecretLoginButton -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Umbraco.Community.SuperSecretLoginButton" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Umbraco.Community.SuperSecretLoginButton" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Umbraco.Community.SuperSecretLoginButton" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Umbraco.Community.SuperSecretLoginButton --version 0.1.0
                    
#r "nuget: Umbraco.Community.SuperSecretLoginButton, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Umbraco.Community.SuperSecretLoginButton@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Umbraco.Community.SuperSecretLoginButton&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Umbraco.Community.SuperSecretLoginButton&version=0.1.0
                    
Install as a Cake Tool

Super Secret Login Button

A "Log in with Umbraco" button on your site that only appears for browsers that have logged in to the backoffice before. Everyone else gets nothing: no hidden element, no script, not a byte.

Umbraco has nothing like this out of the box. The older "edit link" packages show a link while someone is logged in right now, and that check needs the backoffice session. This one remembers that a browser has ever logged in, so the button is still there after the session has expired, which is exactly when you want it.

How it works

  1. The backoffice remembers the browser. A backoffice entry point runs once the backoffice has started (so only after a successful login) and sets a cookie, super_secret_login=1, on the site's domain. It is not Umbraco's session cookie, so logging out leaves it in place. It lasts 400 days (the most a browser allows) and is refreshed every time the backoffice opens.
  2. The site checks for the cookie. The <super-secret-login-button /> tag helper renders the button only when that cookie comes with the request. Otherwise it renders nothing at all.
  3. The button goes to the page you're on. On a content page it links to that page's editor in the backoffice. If you aren't logged in any more, Umbraco shows the login screen first.

The cookie is a hint, not a key. Anyone who sets it by hand sees a button that leads to your normal login screen, the same one at /umbraco that every Umbraco site has.

Install

dotnet add package Umbraco.Community.SuperSecretLoginButton

Add the tag helpers to Views/_ViewImports.cshtml:

@addTagHelper *, Umbraco.Community.SuperSecretLoginButton

Put the button in your layout, just before </body>:

<super-secret-login-button />

Then log in to the backoffice once and visit your site.

Options

Attribute Default What it does
text Log in with Umbraco The button's words
position bottom-right bottom-right, bottom-left, top-right or top-left
href the current page's editor Where the button goes
edit-page true false always goes to the backoffice's start page
backoffice-path /umbraco The backoffice's address
<super-secret-login-button text="Edit" position="top-left" />

The button is hidden when the page is shown inside a frame (the backoffice preview, for one) and when printing.

Things to know

  • Page caching. If something caches whole pages (output caching, or a CDN in front of the site), it may save a copy of a page with the button in it and serve it to everyone. Leave the cookie out of the cache key and you have that problem; vary on it, or don't cache for requests that carry it.
  • Static exports. A tool that saves your rendered pages as static files sends no cookies, so the button is never in them.
  • Separate domains. The cookie belongs to the domain the backoffice is on. If the public site is on another domain, the button won't show there.
  • Forgetting a browser. Delete the super_secret_login cookie for the site.

Requirements

Umbraco 17 (.NET 10).

Licence

MIT

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 42 11/20/2026