Initial commit

This commit is contained in:
ZLI263
2025-11-23 11:20:51 +08:00
commit 355e056ae7
1025 changed files with 123077 additions and 0 deletions

View File

@@ -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
}
}
}