You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After calling the build, why is it failing with error *error signing token: failed to serialize token at step #2: failed to generate signature for signer #0 (alg=RS256): failed to sign payload: failed to retrieve rsa.PrivateKey out of string: keyconv: expected rsa.PrivateKey or rsa.PrivateKey, got string
`
b := setDefaultBuilder(user, twitter.AccessTokenLifetime, s.Conf)
How to Sign a jwt token with just a string and not publicKey and privateKey
You can't (at least not for a RSA family algorithms). I think the documentation is pretty explicit saying that the key needs to be one of (1) a raw key (*rsa.PrivateKey, et al), (2) a crypto.Signer, or (3) a jwk.Key
I can only guess what's store in the s.Conf.Jwt.Secret variable, but I have a feeling you are copying from an example that uses a symmetric algorithm, such as HS256. In that case, the raw key could be a []byte, which is the "raw" version of a jwk.SymmetricKey
How to Sign a jwt token with just a string and not publicKey and privateKey
You can't (at least not for a RSA family algorithms). I think the documentation is pretty explicit saying that the key needs to be one of (1) a raw key (*rsa.PrivateKey, et al), (2) a crypto.Signer, or (3) a jwk.Key
I can only guess what's store in the s.Conf.Jwt.Secret variable, but I have a feeling you are copying from an example that uses a symmetric algorithm, such as HS256. In that case, the raw key could be a []byte, which is the "raw" version of a jwk.SymmetricKey
After calling the build, why is it failing with error *error signing token: failed to serialize token at step #2: failed to generate signature for signer #0 (alg=RS256): failed to sign payload: failed to retrieve rsa.PrivateKey out of string: keyconv: expected rsa.PrivateKey or rsa.PrivateKey, got string
`
b := setDefaultBuilder(user, twitter.AccessTokenLifetime, s.Conf)
`
The text was updated successfully, but these errors were encountered: