diff --git a/business/auth2/authprovider/weixin/weixin.go b/business/auth2/authprovider/weixin/weixin.go index 2f4b344a9..a1876c258 100644 --- a/business/auth2/authprovider/weixin/weixin.go +++ b/business/auth2/authprovider/weixin/weixin.go @@ -27,7 +27,6 @@ var ( AutherObjWX *Auther AutherObjMP *Auther AutherObjNative *Auther - AutherObjApp *Auther ) var ( @@ -49,11 +48,6 @@ func init() { authType: AuthTypeWXNative, } auth2.RegisterAuther(AuthTypeWXNative, AutherObjNative) - - AutherObjApp = &Auther{ - authType: AuthTypeWxApp, - } - auth2.RegisterAuther(AuthTypeWxApp, AutherObjApp) } func (a *Auther) VerifySecret(id, secret string) (authBindEx *auth2.AuthBindEx, err error) { diff --git a/business/auth2/authprovider/weixin/weixin_mini.go b/business/auth2/authprovider/weixin/weixin_mini.go index 072ea9573..b6b31715f 100644 --- a/business/auth2/authprovider/weixin/weixin_mini.go +++ b/business/auth2/authprovider/weixin/weixin_mini.go @@ -27,11 +27,15 @@ var ( var ( AutherObjMini *MiniAuther + AutherObjApp *MiniAuther ) func init() { AutherObjMini = new(MiniAuther) auth2.RegisterAuther(AuthTypeMini, AutherObjMini) + + AutherObjApp = new(MiniAuther) + auth2.RegisterAuther(AuthTypeWxApp, AutherObjApp) } func (a *MiniAuther) VerifySecret(dummy, jsCode string) (authBindEx *auth2.AuthBindEx, err error) {