Skip to content

Commit

Permalink
fix defaults for grant_types on okta_app_oauth not being picked up
Browse files Browse the repository at this point in the history
Signed-off-by: Tien Nguyen <duytien.nguyen@okta.com>
  • Loading branch information
duytiennguyen-okta committed Oct 31, 2024
1 parent 6670eff commit 21fdc3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions okta/resource_okta_app_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@ func buildAppOAuth(d *schema.ResourceData, isNew bool) *sdk.OpenIdConnectApplica

func validateGrantTypes(d *schema.ResourceData) error {
grantTypeList := convertInterfaceToStringSet(d.Get("grant_types"))
// If grant_types are not set, we default to the bare minimum in func buildAppOAuth
if len(grantTypeList) < 1 {
return nil
}
appType := d.Get("type").(string)
appMap, ok := appRequirementsByType[appType]
if !ok {
Expand Down

0 comments on commit 21fdc3f

Please sign in to comment.