feat(app): update
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user