(cmd *cobra.Command, cli *cli, input *promptScreen, action string)
| 368 | } |
| 369 | |
| 370 | func fetchPromptScreenInfo(cmd *cobra.Command, cli *cli, input *promptScreen, action string) error { |
| 371 | if input.promptName == "" { |
| 372 | cli.renderer.Infof("Please select a prompt to %s its rendering mode:", action) |
| 373 | if err := promptName.Select(cmd, &input.promptName, utils.FetchKeys(PromptScreenMap), nil); err != nil { |
| 374 | return handleInputError(err) |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | if input.screenName == "" { |
| 379 | if len(PromptScreenMap[input.promptName]) > 1 { |
| 380 | cli.renderer.Infof("Please select a screen to %s its rendering mode:", action) |
| 381 | if err := screenName.Select(cmd, &input.screenName, PromptScreenMap[input.promptName], nil); err != nil { |
| 382 | return handleInputError(err) |
| 383 | } |
| 384 | } else { |
| 385 | input.screenName = PromptScreenMap[input.promptName][0] |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | return nil |
| 390 | } |
| 391 | |
| 392 | func ensureNewUniversalLoginExperienceIsActive(ctx context.Context, api *auth0.API) error { |
| 393 | authenticationProfile, err := api.Prompt.Read(ctx) |
no test coverage detected