Error verifying token: oidc: malformed jwt

Facing the below error while trying to execute the following command.
export VAULT_TOKEN="$(vault write -field=token -format=json auth/jwt/login role=my-role jwt=xx.xxxxxxxxx)"
Error writing data to auth/jwt/login: Error making API request.

Code: 400. Errors:

  • error verifying token: oidc: malformed jwt: square/go-jose: compact JWS format must have three parts

Just to be sure, its a valid JWT - ie, can you verify it via and it all makes sense?

1 Like