How to create okta_app_oauth with public/private key

I’m trying to use Terraform and the Okta provider to create an application (okta_app_oauth) that has a public/private key rather than client secret. What arguments do I need to supply Terraform to have the public/private key generated automatically?

Here is an example that creates an app with a client id/client secret:

resource "okta_app_oauth" "test_app" {
  label          = "testAcc_replace_with_uuid"
  type           = "service"
  grant_types    = ["client_credentials"]
}

To start, you’ll need to set the token_endpoint_auth_method to private_key_jwt. You’ll also need to provided the public key as a JWK

Thanks for your reply! I thought there would be a way to generate both the public key and the private key rather than supplying one of them. I’ll try what you suggested.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.