1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 12:52:27 +08:00

feat(auth): getAccessToken with context (#820)

This commit is contained in:
fearlessfei
2025-03-25 14:20:12 +08:00
committed by GitHub
parent 010e49c35c
commit 635a0c640d

View File

@@ -81,7 +81,7 @@ func (auth *Auth) CheckEncryptedDataContext(ctx context2.Context, encryptedMsgHa
var ( var (
at string at string
) )
if at, err = auth.GetAccessToken(); err != nil { if at, err = auth.GetAccessTokenContext(ctx); err != nil {
return return
} }
@@ -120,7 +120,7 @@ func (auth *Auth) GetPhoneNumberContext(ctx context2.Context, code string) (*Get
at string at string
err error err error
) )
if at, err = auth.GetAccessToken(); err != nil { if at, err = auth.GetAccessTokenContext(ctx); err != nil {
return nil, err return nil, err
} }
body := map[string]interface{}{ body := map[string]interface{}{