feat: show placeholder QR code with loading instead of "Loading" text in QR code login page (#4031)

This commit is contained in:
DacongDA
2025-08-02 15:58:49 +08:00
committed by GitHub
parent 462ecce43b
commit d537377b31
5 changed files with 17 additions and 30 deletions

View File

@@ -17,7 +17,6 @@ package idp
import (
"bytes"
"crypto/sha1"
"encoding/base64"
"encoding/hex"
"encoding/json"
"fmt"
@@ -29,7 +28,6 @@ import (
"sync"
"time"
"github.com/skip2/go-qrcode"
"golang.org/x/oauth2"
)
@@ -324,10 +322,7 @@ func GetWechatOfficialAccountQRCode(clientId string, clientSecret string, provid
return "", "", err
}
var png []byte
png, err = qrcode.Encode(data.URL, qrcode.Medium, 256)
base64Image := base64.StdEncoding.EncodeToString(png)
return base64Image, data.Ticket, nil
return data.URL, data.Ticket, nil
}
func VerifyWechatSignature(token string, nonce string, timestamp string, signature string) bool {