Would it be possible to sign a jwt token with a RSA public key?

I can sign the token with the private key. see the code below. I would like to change it and make it sign with the public key.

return Jwts.builder()
.signWith(RS256, this.jwtKeyPrivateProvider.getPrivateKey())

Hi @cvfelipeoliveira,

Welcome to the Auth0 Community!

Not really…technically you could use the public key to make a signed JWT, but it wont work the same way as a JWT signed with the private key. Can you explain why you want to do this?