Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(server): mark the identity reset as writing its new key on its own

Maurice4ab3244f8f1c
diff --git a/server/src/nest/service-identity/service-key.service.ts b/server/src/nest/service-identity/service-key.service.ts
index b5d8f861d..ba45ff54e 100644
--- a/server/src/nest/service-identity/service-key.service.ts
+++ b/server/src/nest/service-identity/service-key.service.ts
@@ -138,7 +138,10 @@ export class ServiceKeyService {
});
}
- /** The admin's way out of a revoked or cloned identity: forget the key and ask for a new one. */
+ /**
+ * The admin's way out of a revoked or cloned identity: forget the key and ask for a new one.
+ * @txIndependent the new key is written in the background once the issuer answered, long after the old one is gone.
+ */
async regenerate(): Promise<void> {
if (this.config.key) throw conflict('The key is set by TREK_SERVICES_KEY and is changed there');
if (!this.inUse()) throw conflict('TREK services are not in use on this instance');