the crypto.PublicKey is defined as any, although I don't know why it compiles.
But the type checking does throw an exception

// VerificationKey represents a public or secret key for verifying a token's signature.
type VerificationKey interface {
crypto.PublicKey | []uint8
}
// VerificationKeySet is a set of public or secret keys. It is used by the parser to verify a token.
type VerificationKeySet struct {
Keys []VerificationKey
}
VerificationKeySet should also be changed to
type VerificationKeySet[T VerificationKey] struct {
Keys []T
}
However, since any exists, this doesn't seem to make any sense.
Finally, I changed it to this.
// VerificationKey represents a public or secret key for verifying a token's signature.
type VerificationKey = any
// VerificationKeySet is a set of public or secret keys. It is used by the parser to verify a token.
type VerificationKeySet struct {
Keys []VerificationKey
}