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

Method saveCachedToken

wxapp/fej.js:96–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

loginByWxCodeMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected