-
Notifications
You must be signed in to change notification settings - Fork 55
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
DXCDT-302: Fix prompts update failing for non-login prompt types #584
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
253f880
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd 4cea50f
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd 69917ab
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd 2737584
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd d58729f
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd 6986baa
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd 8b97922
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd 494cbf3
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd 7222ab4
Merge branch 'v1' of https://github.com/auth0/auth0-cli into v1
willvedd b860dc5
Fixing prompts update command
willvedd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,9 +214,12 @@ func downloadDefaultBrandingTextTranslations(prompt, language string) map[string | |
return nil | ||
} | ||
|
||
selectedPrompt := allPrompts[0][prompt].(map[string]interface{}) | ||
|
||
return selectedPrompt | ||
for _, value := range allPrompts { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now, we'll want to iterated through all the values to match the provided prompt type. |
||
_, ok := value[prompt] | ||
if ok { | ||
return value[prompt].(map[string]interface{}) | ||
} | ||
} | ||
} | ||
|
||
return nil | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"login": { | ||
"pageTitle": "Log in | ${clientName}", | ||
"title": "Welcome", | ||
"description": "Log in to ${companyName} to continue to ${clientName}.", | ||
"separatorText": "Or", | ||
"buttonText": "Continue", | ||
"federatedConnectionButtonText": "Continue with ${connectionName}", | ||
"footerLinkText": "Sign up", | ||
"signupActionLinkText": "${footerLinkText}", | ||
"footerText": "Don't have an account?", | ||
"signupActionText": "${footerText}", | ||
"forgotPasswordText": "Forgot password?", | ||
"passwordPlaceholder": "Password", | ||
"usernamePlaceholder": "Username or email address", | ||
"emailPlaceholder": "Email address", | ||
"editEmailText": "Edit", | ||
"alertListTitle": "Alerts", | ||
"invitationTitle": "You've Been Invited!", | ||
"invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", | ||
"logoAltText": "${companyName}", | ||
"showPasswordText": "Show password", | ||
"hidePasswordText": "Hide password", | ||
"wrong-credentials": "Wrong username or password", | ||
"invalid-email-format": "Email is not valid.", | ||
"wrong-email-credentials": "Wrong email or password", | ||
"custom-script-error-code": "Something went wrong, please try again later.", | ||
"auth0-users-validation": "Something went wrong, please try again later", | ||
"authentication-failure": "We are sorry, something went wrong when attempting to login", | ||
"invalid-connection": "Invalid connection", | ||
"ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", | ||
"no-db-connection": "Invalid connection", | ||
"password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", | ||
"user-blocked": "Your account has been blocked after multiple consecutive login attempts.", | ||
"same-user-login": "Too many login attempts for this user. Please wait, and try again later.", | ||
"no-email": "Please enter an email address", | ||
"no-password": "Password is required", | ||
"no-username": "Username is required" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"mfa-push-welcome": { | ||
"pageTitle": "Install the application | ${clientName}", | ||
"title": "Secure Your Account", | ||
"description": "In order to continue, install the ${appName} app via the app store from your mobile device.", | ||
"androidButtonText": "Google Play", | ||
"buttonText": "Continue", | ||
"iosButtonText": "App Store", | ||
"pickAuthenticatorText": "Try another method", | ||
"logoAltText": "${companyName}" | ||
}, | ||
"mfa-push-enrollment-qr": { | ||
"pageTitle": "Scan the code to log in using a push notification | ${clientName}", | ||
"title": "Secure Your Account", | ||
"description": "Scan the QR Code below using the ${appName} app on your mobile device.", | ||
"pickAuthenticatorText": "Try another method", | ||
"buttonText": "Continue", | ||
"logoAltText": "${companyName}", | ||
"enrollment-transaction-pending": "You must scan the QR code with the ${appName} app on your mobile device." | ||
}, | ||
"mfa-push-enrollment-code": { | ||
"pageTitle": "Copy the code to log in using a push notification | ${clientName}", | ||
"buttonText": "Continue", | ||
"altText": "Secure code to copy", | ||
"copyCodeButtonText": "Copy Code", | ||
"instructions1": "Open the ${appName} app on your phone and tap \"+\" button.", | ||
"instructions2": "Select Add account manually", | ||
"instructions3": "Copy & paste this code to that screen", | ||
"title": "Trouble scanning?", | ||
"logoAltText": "${companyName}" | ||
}, | ||
"mfa-push-success": { | ||
"pageTitle": "Device registration successful | ${clientName}", | ||
"title": "You're All Set!", | ||
"buttonText": "Continue", | ||
"description": "We’re redirecting you to ${clientName} now. If you’re not redirected automatically, you can manually redirect yourself below." | ||
}, | ||
"mfa-push-challenge-push": { | ||
"pageTitle": "Accept the push notification to log in | ${clientName}", | ||
"title": "Verify Your Identity", | ||
"description": "We’ve sent a notification to the following device via the ${appName} app:", | ||
"buttonText": "I've responded on my device", | ||
"pickAuthenticatorText": "Try another method", | ||
"rememberMeText": "Remember this device for 30 days", | ||
"resendActionText": "Resend", | ||
"resendText": "Didn't receive a notification?", | ||
"enterOtpCode": "Manually Enter Code", | ||
"separatorText": "OR", | ||
"logoAltText": "${companyName}", | ||
"challenge-transaction-pending": "You must accept the notification via the ${appName} app on your mobile device.", | ||
"polling-interval-exceeded": "We have not received a confirmation, please slow down.", | ||
"too-many-push": "We have received too many notification requests. Wait a few minutes and try again.", | ||
"transaction-not-found": "Your enrollment transaction expired, you will need to start again.", | ||
"mfa-push-verify-transaction-pending": "We have not received a confirmation, please try scanning the code again.", | ||
"mfa-push-verify-authenticator-error": "We couldn't verify the enrollment. Please try again later.", | ||
"mfa-push-challenge-authenticator-error": "We couldn't send the notification. Please try again later.", | ||
"transaction-rejected": "Notification rejected" | ||
}, | ||
"mfa-push-list": { | ||
"pageTitle": "List of available devices | ${clientName}", | ||
"backText": "Go back", | ||
"title": "Registered Devices" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that the
allPrompts
is a set of twenty-something values, each with a single-property object pertaining to a specific prompt type.This is why the
login
prompt was working, because it was the zeroth index in this set.