MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / saveCachedToken

Method saveCachedToken

wxapp/campari.js:101–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 }
100
101 saveCachedToken() {
102 if (!this.session.token) return;
103 const cache = readTokenCache();
104 cache[this.openid] = {
105 token: this.session.token,
106 openid: this.session.openid || "",
107 sessionKey: this.session.sessionKey || "",
108 updatedAt: new Date().toISOString(),
109 };
110 writeTokenCache(cache);
111 }
112
113 removeCachedToken() {
114 const cache = readTokenCache();

Callers 3

runMethod · 0.95
loginByWxCodeMethod · 0.95
refreshTokenMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected