Closed deepanshug closed 9 months ago
In short, signing by openssl throws Invalid JWT SIgnature error while signing bu google.auth.crypt package (in python) generates a valid one that gives me access token
Please help
Please refer to Google's documentation about how to use their JWT. Looking at https://googleapis.dev/python/google-auth/latest/reference/google.auth.crypt.html you'll need to implment whatever logic that is doing under the hood.
There are old issues around this, you should do some research on this topic https://github.com/Thalhammer/jwt-cpp/issues/282 https://github.com/Thalhammer/jwt-cpp/issues/271#issuecomment-1336502752 you are probably going to need #146 :)
I am going to mark this as closed since it's related to how to using Google not the library, please feel free to open a new issue with any specific technical questions about the library :)
I agree, thanks for closing.
What's your question?
Invalid Signature when using RSA 256 sign
Additional Context
Hi, I used your library for a particular use case to generate JWT token for google APIs. To access google APIs, I am using service account which gives me key.json file with private key in it.
I tried to use this private key mentioned in key.json file and used as below ".sign(jwt::algorithm::rs256("", rsa_priv_key, "", ""));" where rsa_priv_key contains value from key.json file.
My question is: is there any way that I can pass this key.json file to sign?