feat(auth): improve email and mobile config unmarshalling with default values

This commit is contained in:
Chang lue Tsen
2025-07-19 14:44:36 -04:00
committed by Leif Draven
parent 0e8e2d442e
commit 6034a32e85
7 changed files with 117 additions and 39 deletions
@@ -52,8 +52,10 @@ func (l *BindOAuthCallbackLogic) BindOAuthCallback(req *types.BindOAuthCallbackR
err = l.google(req)
case "apple":
err = l.apple(req)
case "telegram":
err = l.telegram(req)
default:
l.Errorw("oauth login method not support: %v", logger.Field("method", req.Method))
l.Errorw("oauth login method not support", logger.Field("method", req.Method))
return errors.Wrapf(xerr.NewErrCode(xerr.ERROR), "oauth login method not support: %v", req.Method)
}
if err != nil {
@@ -212,3 +214,7 @@ func (l *BindOAuthCallbackLogic) apple(req *types.BindOAuthCallbackRequest) erro
}
return nil
}
func (l *BindOAuthCallbackLogic) telegram(req *types.BindOAuthCallbackRequest) error {
return nil
}