- set correct authIDType when calling auth2.Login
This commit is contained in:
@@ -60,6 +60,11 @@ func (c *Auth2Controller) SendVerifyCode() {
|
||||
// @router /Login [post]
|
||||
func (c *Auth2Controller) Login() {
|
||||
c.callLogin(func(params *tAuth2LoginParams) (retVal interface{}, errCode string, err error) {
|
||||
if params.AuthType == auth2.AuthTypeMobile {
|
||||
params.AuthIDType = auth2.UserIDMobile
|
||||
} else if params.AuthType == auth2.AuthTypeEmail {
|
||||
params.AuthIDType = auth2.UserIDEmail
|
||||
}
|
||||
retVal, err = auth2.Login(params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret)
|
||||
return retVal, "", err
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user