This commit is contained in:
2025-03-28 16:27:26 +08:00
parent f654e16c18
commit a3e6a6d8b8
494 changed files with 4072 additions and 47246 deletions
@@ -0,0 +1,17 @@
module.exports = async function () {
if (this.authInfo) { // 多次执行auth时如果第一次成功后续不再执行
return
}
const token = this.getUniversalUniIdToken()
const payload = await this.uniIdCommon.checkToken(token)
if (payload.errCode) {
throw payload
}
this.authInfo = payload
if (payload.token) {
this.response.newToken = {
token: payload.token,
tokenExpired: payload.tokenExpired
}
}
}