MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / saveCachedToken

Method saveCachedToken

wxapp/fafa.js:121–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119 }
120
121 saveCachedToken() {
122 if (!this.authorization) return;
123 const cache = readTokenCache();
124 cache[this.cacheKey()] = {
125 accessToken: this.accessToken,
126 authorization: this.authorization,
127 userId: this.userInfo.userId || "",
128 nickName: this.userInfo.nickName || "",
129 userMobile: this.userInfo.userMobile || "",
130 updatedAt: new Date().toISOString(),
131 };
132 writeTokenCache(cache);
133 }
134
135 removeCachedToken() {
136 const cache = readTokenCache();

Callers 3

runMethod · 0.95
loginByWxCodeMethod · 0.95
getUserInfoMethod · 0.95

Calls 3

cacheKeyMethod · 0.95
readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected