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

Method saveCachedToken

wxapp/parkson.js:95–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

loginByWxCodeMethod · 0.95
getUserInfoMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected