()
| 124 | } |
| 125 | |
| 126 | saveCachedToken() { |
| 127 | if (!this.token) return; |
| 128 | const cache = readTokenCache(); |
| 129 | cache[this.openid] = { |
| 130 | accessToken: this.token, |
| 131 | refreshToken: this.refreshToken, |
| 132 | userId: this.userId, |
| 133 | userInfo: this.userInfo, |
| 134 | visitor: this.visitor, |
| 135 | updatedAt: new Date().toISOString(), |
| 136 | }; |
| 137 | writeTokenCache(cache); |
| 138 | } |
| 139 | |
| 140 | removeCachedToken() { |
| 141 | const cache = readTokenCache(); |
no test coverage detected