支持登录类型wxnative
This commit is contained in:
@@ -13,6 +13,10 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
const (
|
||||
AuthTypeMini = "weixinmini" // 小程序
|
||||
)
|
||||
|
||||
type MiniAuther struct {
|
||||
authprovider.DefAuther
|
||||
}
|
||||
@@ -37,7 +41,7 @@ func (a *MiniAuther) VerifySecret(dummy, jsCode string) (authBindEx *auth2.AuthB
|
||||
if err == nil {
|
||||
sessionKey := sessionInfo.SessionKey
|
||||
sessionInfo.SessionKey = ""
|
||||
if authBindEx, err = a.UnionFindAuthBind(AuthTypeMini, []string{AuthTypeWeixin, AuthTypeMP, AuthTypeMini}, sessionInfo.OpenID, sessionInfo.UnionID, sessionInfo); err == nil {
|
||||
if authBindEx, err = a.UnionFindAuthBind(AuthTypeMini, []string{AuthTypeWeixin, AuthTypeMP, AuthTypeMini, AuthTypeWXNative}, sessionInfo.OpenID, sessionInfo.UnionID, sessionInfo); err == nil {
|
||||
authBindEx.UserData = sessionKey
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user