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

Method saveCachedToken

wxapp/colorful.js:148–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146 }
147
148 saveCachedToken() {
149 if (!this.token) return;
150 const cache = readTokenCache();
151 cache[this.cacheKey()] = {
152 token: this.token,
153 refreshToken: this.refreshToken,
154 openId: this.openId,
155 userInfo: this.userInfo,
156 updatedAt: new Date().toISOString(),
157 };
158 writeTokenCache(cache);
159 }
160
161 removeCachedToken() {
162 const cache = readTokenCache();

Callers 4

runMethod · 0.95
requestMethod · 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