This commit is contained in:
eson
2023-08-29 14:27:00 +08:00
parent 7559777df7
commit 8908273af5
3 changed files with 10 additions and 14 deletions

View File

@@ -6,7 +6,6 @@ import (
"fusenapi/utils/auth"
"fusenapi/utils/basic"
"fusenapi/utils/wevent"
"log"
"time"
"context"
@@ -92,19 +91,16 @@ func (l *UserEmailConfirmationLogic) UserEmailConfirmation(req *types.RequestEma
token, err := l.svcCtx.OAuthTokenManger.Decrypt(req.Token)
if err != nil {
logx.Info(req.Token)
logx.Error(err)
return resp.SetStatus(basic.CodeOAuthRegisterTokenErr)
}
log.Println("aaaa", "接收校验token", token.Platform)
switch token.OperateType {
case auth.OpTypeRegister:
if time.Since(token.CreateAt) >= 24*time.Hour {
return resp.SetStatus(basic.CodeOAuthConfirmationTimeoutErr)
}
logx.Info(token.Platform)
switch token.Platform {
case "google":
// 谷歌平台的注册流程