From 10288c47df6b13e667391a9264dd35b3ea6d9441 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Wed, 22 Feb 2023 13:54:21 +0100 Subject: [PATCH] Add missing prompt types --- docs/resources/prompt_custom_text.md | 4 ++-- internal/auth0/prompt/resource_custom_text.go | 20 +++++++------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/docs/resources/prompt_custom_text.md b/docs/resources/prompt_custom_text.md index 7736e837a..528d48930 100644 --- a/docs/resources/prompt_custom_text.md +++ b/docs/resources/prompt_custom_text.md @@ -48,8 +48,8 @@ resource "auth0_prompt_custom_text" "example" { ### Required - `body` (String) JSON containing the custom texts. You can check the options for each prompt [here](https://auth0.com/docs/customize/universal-login-pages/customize-login-text-prompts#prompt-values). -- `language` (String) Language of the custom text. Options include `ar`, `bg`, `bs`, `cs`, `da`, `de`, `el`, `en`, `es`, `et`, `fi`, `fr`, `fr-CA`, `fr-FR`, `he`, `hi`, `hr`, `hu`, `id`, `is`, `it`, `ja`, `ko`, `lt`, `lv`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `pt-PT`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-CN`, `zh-TW` -- `prompt` (String) The term `prompt` is used to refer to a specific step in the login flow. Options include `login`, `login-id`, `login-password`, `login-email-verification`, `signup`, `signup-id`, `signup-password`, `reset-password`, `consent`, `mfa-push`, `mfa-otp`, `mfa-voice`, `mfa-phone`, `mfa-webauthn`, `mfa-sms`, `mfa-email`, `mfa-recovery-code`, `mfa`, `status`, `device-flow`, `email-verification`, `email-otp-challenge`, `organizations`, `invitation`, `common`. +- `language` (String) Language of the custom text. Options include: `ar`, `bg`, `bs`, `cs`, `da`, `de`, `el`, `en`, `es`, `et`, `fi`, `fr`, `fr-CA`, `fr-FR`, `he`, `hi`, `hr`, `hu`, `id`, `is`, `it`, `ja`, `ko`, `lt`, `lv`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `pt-PT`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-CN`, `zh-TW`. +- `prompt` (String) The term `prompt` is used to refer to a specific step in the login flow. Options include: `common`, `consent`, `device-flow`, `email-otp-challenge`, `email-verification`, `invitation`, `login`, `login-id`, `login-password`, `login-passwordless`, `login-email-verification`, `logout`, `mfa`, `mfa-email`, `mfa-otp`, `mfa-phone`, `mfa-push`, `mfa-recovery-code`, `mfa-sms`, `mfa-voice`, `mfa-webauthn`, `organizations`, `reset-password`, `signup`, `signup-id`, `signup-password`. ### Read-Only diff --git a/internal/auth0/prompt/resource_custom_text.go b/internal/auth0/prompt/resource_custom_text.go index 220c66725..c42e146a4 100644 --- a/internal/auth0/prompt/resource_custom_text.go +++ b/internal/auth0/prompt/resource_custom_text.go @@ -18,10 +18,10 @@ import ( var ( availablePrompts = []string{ - "login", "login-id", "login-password", "login-email-verification", "signup", "signup-id", "signup-password", - "reset-password", "consent", "mfa-push", "mfa-otp", "mfa-voice", "mfa-phone", "mfa-webauthn", "mfa-sms", - "mfa-email", "mfa-recovery-code", "mfa", "status", "device-flow", "email-verification", "email-otp-challenge", - "organizations", "invitation", "common", + "common", "consent", "device-flow", "email-otp-challenge", "email-verification", "invitation", "login", + "login-id", "login-password", "login-passwordless", "login-email-verification", "logout", "mfa", "mfa-email", + "mfa-otp", "mfa-phone", "mfa-push", "mfa-recovery-code", "mfa-sms", "mfa-voice", "mfa-webauthn", + "organizations", "reset-password", "signup", "signup-id", "signup-password", } availableLanguages = []string{ "ar", "bg", "bs", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "fr-CA", "fr-FR", "he", "hi", "hr", @@ -50,20 +50,14 @@ func NewCustomTextResource() *schema.Resource { Required: true, ValidateFunc: validation.StringInSlice(availablePrompts, false), Description: "The term `prompt` is used to refer to a specific step in the login flow. " + - "Options include `login`, `login-id`, `login-password`, `login-email-verification`, `signup`, " + - "`signup-id`, `signup-password`, `reset-password`, `consent`, `mfa-push`, `mfa-otp`, `mfa-voice`," + - " `mfa-phone`, `mfa-webauthn`, `mfa-sms`, `mfa-email`, `mfa-recovery-code`, `mfa`, `status`, " + - "`device-flow`, `email-verification`, `email-otp-challenge`, `organizations`, " + - "`invitation`, `common`.", + "Options include: `" + strings.Join(availablePrompts, "`, `") + "`.", }, "language": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice(availableLanguages, false), - Description: "Language of the custom text. Options include `ar`, `bg`, `bs`, `cs`, `da`, `de`, `el`, " + - "`en`, `es`, `et`, `fi`, `fr`, `fr-CA`, `fr-FR`, `he`, `hi`, `hr`, `hu`, `id`, `is`, `it`, `ja`, " + - "`ko`, `lt`, `lv`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `pt-PT`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, " + - "`th`, `tr`, `uk`, `vi`, `zh-CN`, `zh-TW`", + Description: "Language of the custom text. Options include: `" + + strings.Join(availableLanguages, "`, `") + "`.", }, "body": { Type: schema.TypeString,