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

Method saveCachedToken

wxapp/nissin.js:97–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95 }
96
97 saveCachedToken() {
98 if (!this.token) return;
99 const cache = readTokenCache();
100 cache[this.openid] = {
101 accessToken: this.token,
102 redOpenId: this.redOpenId,
103 userId: this.userId,
104 mobile: this.user.mobile || "",
105 updatedAt: new Date().toISOString(),
106 };
107 writeTokenCache(cache);
108 }
109
110 removeCachedToken() {
111 const cache = readTokenCache();

Callers 2

loginByWxCodeMethod · 0.95
getUserMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected