feat(app): update

This commit is contained in:
Yangtao
2025-11-19 14:24:13 +08:00
parent 1eac66d7fd
commit 0c34585649
329 changed files with 10760 additions and 281 deletions

View File

@ -101,7 +101,7 @@ func (client *AppleClient) VerifyAppleAuthCode(authCode string) (appleUserId str
resultErr = err
return
}
token, _ := jwt.ParseWithClaims(resultDTO.IdToken, &Claims{}, func(token *jwt.Token) (interface{}, error) {
token, _ := jwt.ParseWithClaims(resultDTO.IdToken, &Claims{}, func(token *jwt.Token) (any, error) {
// Don't forget to validate the alg is what you expect:
if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok {
return nil, fmt.Errorf("Unexpected signing method: %v ", token.Header["alg"])
@ -120,7 +120,7 @@ func (client *AppleClient) VerifyAppleAuthCode(authCode string) (appleUserId str
func (client *AppleClient) GenerateClientSecret() (secret string) {
token := &jwt.Token{
Header: map[string]interface{}{
Header: map[string]any{
"alg": "ES256",
"kid": viper.GetString("apple.KeyId"),
},
@ -152,7 +152,7 @@ func AuthKeyFromBytes(key []byte) (*ecdsa.PrivateKey, error) {
}
// Parse the key
var parsedKey interface{}
var parsedKey any
if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil {
return nil, err
}