You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Derives a stable cache key for an entitlement account reference.
52
52
*
53
-
* Produces one of six deterministic keys:
53
+
* Produces one of five deterministic keys:
54
54
* - `account:<trimmed accountId>::email:<lowercased trimmed email>` when both are present,
55
55
* - `email:<lowercased trimmed email>` when only `email` is present,
56
56
* - `account:<trimmed accountId>::idx:<non-negative integer>` when `accountId` is present without email,
57
57
* - `account:<trimmed accountId>` when only `accountId` is present and no index is available,
58
-
* - `refresh:<trimmed refreshToken>` when no accountId/email exists but a refresh token is available,
59
58
* - `idx:<non-negative integer>` otherwise (index defaults to 0).
60
59
*
61
-
* This function is pure and concurrency-safe; it performs no I/O and is not affected by Windows filesystem semantics. It does not redact secrets or tokens — values are only trimmed and, for emails, lowercased.
60
+
* This function is pure and concurrency-safe; it performs no I/O and is not affected by Windows filesystem semantics. It never serializes refresh tokens or other secrets into the returned key.
62
61
*
63
62
* @param ref - Reference identifying an account (may include `accountId`, `email`, or `index`)
64
-
* @returns A deterministic string key prefixed with `account:`, `email:`, `refresh:`, or `idx:` as described above
63
+
* @returns A deterministic string key prefixed with `account:`, `email:`, or `idx:` as described above
0 commit comments