v0.32.0¶
Release Date: 2026-11-05
A manager can now replace a managed principal's printed card in one step, and the sign-in methods page becomes a page an application can send people to from its own settings.
- Replace login tokens.
managedprincipal.Service.ReplaceLoginTokensrevokes every live login token of a managed principal and issues one new token, in one transaction. It takes the same input asIssueLoginToken(name, single use, expiry) and is authorized the same way, bymanage_credentials. If issuing fails, nothing is revoked, so a failure leaves the old card working rather than none. Two replaces at once on PostgreSQL leave one token. Sessions already signed in with an old token keep running;RevokeAllends them too. - Over HTTP.
managedprincipal.NewHandlerserves it asPOST /{principalID}/login-tokens/replace, with the issue body. It answers 201 with the new token andrevoked, the number of tokens it revoked.mpclient.Client.ReplaceLoginTokenscalls it. - Audited once. A replace emits
managed_principal.login_tokens_replacedwith the new token's identifiers and the number revoked. - Checked under the lock. Issuing and replacing now check the issuer's
authority under the managed principal's row lock, in the transaction that
issues, as removing a manager does. A manager removed at the same moment
can no longer be issued a token, which
IssueLoginTokenpreviously allowed.
Tokens are stored only as hashes, so a lost or shared card cannot be printed again from what is stored; replacing it is how a card is reprinted.
Sign-in methods¶
- What is linked.
/account/sign-in-methodsshows the account's email and the providers already linked to it, and offers a Link button only for the others. Directories list linked providers through the optionalLinkedProviderListerinterface, which the Ent and memory directories implement; with another directory the page offers every provider, as before. - Back to the application. An application links to the page with
return_to, such ashttps://auth.example.com/account/sign-in-methods?return_to=https://app.example.com/settings. It passes the same allowlist as sign-in'sreturn_to(a path on the issuer, or an origin inallowed_redirect_origins) and shows a Back to link, named bysigned_out_nameor else its host. It is kept through signing in first, the link button, the provider and the return to the page, and validated again at each step. An invalidreturn_tois ignored.
The release adds no breaking change.
Upgrading¶
Nothing is required. Applications that print login cards can offer "Replace
card" with the new call instead of revoking each token and issuing a new
one. Applications can link their account settings to
/account/sign-in-methods?return_to=<their settings page>.
See Replacing a Card and Linking sign-in methods.