Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue#497: Add missing prompt types #506

Merged
merged 3 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/resources/prompt_custom_text.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 7 additions & 13 deletions internal/auth0/prompt/resource_custom_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down