mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
feat(server): publish a stable installation identity for client connections
The iOS app lets an account reach one server through several addresses, such as a home network IP and a public name. Before it sends credentials to an alternative address it needs to know the address leads to the same installation, so expose a public, credential-free GET /server-identity returning a persisted UUID, and add the same optional instanceId to app-info with the server-connection-identity feature flag. The UUID lives in a singleton server_identity row shared by every replica, created on first use and cached per process. An unreadable identity omits instanceId instead of failing app-info, which clients rely on for feature detection. Existing routes and bodies are unchanged and the web client does not call the new route; the iOS app does. The migration uses IF NOT EXISTS because an unreleased build created the same table as 0109.
This commit is contained in:
@@ -549,6 +549,24 @@ export const E2E_SUITES = Object.freeze({
|
||||
...SHARED_DB_AND_HELPER_PATHS,
|
||||
],
|
||||
},
|
||||
"server-connection-identity": {
|
||||
id: "server-connection-identity",
|
||||
name: "Server Connection Identity",
|
||||
timeout: 60,
|
||||
lane: "full",
|
||||
description: "Public installation identity and concurrent singleton persistence",
|
||||
vitestTarget: "test/server-connection-identity.e2e-spec.ts",
|
||||
junitOutput: `${TEST_RESULTS_DIR}/server-connection-identity-e2e-junit.xml`,
|
||||
prepareDedicatedDatabase: true,
|
||||
useDedicatedDatabase: true,
|
||||
changedPaths: [
|
||||
"server/src/modules/server-identity/**",
|
||||
"server/src/modules/app-info/**",
|
||||
"server/test/server-connection-identity.e2e-spec.ts",
|
||||
...SHARED_TYPES_PATHS,
|
||||
...SHARED_DB_AND_HELPER_PATHS,
|
||||
],
|
||||
},
|
||||
"app-settings-oidc-contract": {
|
||||
id: "app-settings-oidc-contract",
|
||||
name: "App Settings OIDC Contract",
|
||||
|
||||
Reference in New Issue
Block a user