@mathismeadows/roamer-device-auth 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/roamer-device-auth.mjs +14 -2
package/package.json
CHANGED
package/roamer-device-auth.mjs
CHANGED
|
@@ -197,8 +197,20 @@ async function listKnownClientSlugs() {
|
|
|
197
197
|
for (const entry of entries) {
|
|
198
198
|
// Safe to split on "__" without ambiguity: neither a client slug (clientSlugFromInitializeLine)
|
|
199
199
|
// nor an identity key (identityKeyFromTokens) can contain an underscore post-sanitization.
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
200
|
+
const withIdentity = entry.match(/^roamer_(?:tokens|loopback_tokens)__([^_]+)__/);
|
|
201
|
+
if (withIdentity) {
|
|
202
|
+
slugs.add(withIdentity[1]);
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
// BUG (found live 2026-09-08, caused a real cross-session logout): a slug that has never
|
|
206
|
+
// reconnected since AUTH-54 shipped only has the pre-AUTH-54 legacy file — no identity
|
|
207
|
+
// segment at all — and was invisible here. login/logout's own "if status lists exactly one
|
|
208
|
+
// slug, there's no ambiguity" reasoning then wrongly treated a real, actively-used client as
|
|
209
|
+
// nonexistent, silently acting on a *different* session's slug instead because it was the
|
|
210
|
+
// only one that happened to already be migrated. A legacy-only slug must still count as a
|
|
211
|
+
// real, known candidate even though it has no identity cached under the new scheme yet.
|
|
212
|
+
const legacy = entry.match(/^roamer_(?:tokens|loopback_tokens)__([^_]+)\.json$/);
|
|
213
|
+
if (legacy) slugs.add(legacy[1]);
|
|
202
214
|
}
|
|
203
215
|
return [...slugs].sort();
|
|
204
216
|
}
|