()
| 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(); |
no test coverage detected