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

Prompts partials #979

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions docs/auth0_universal-login.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Manage a consistent, branded Universal Login experience that can handle all of y
## Commands

- [auth0 universal-login customize](auth0_universal-login_customize.md) - Customize the Universal Login experience
- [auth0 universal-login partials](auth0_universal-login_partials.md) - Manage partials for prompts
- [auth0 universal-login prompts](auth0_universal-login_prompts.md) - Manage custom text for prompts
- [auth0 universal-login show](auth0_universal-login_show.md) - Display the custom branding settings for Universal Login
- [auth0 universal-login templates](auth0_universal-login_templates.md) - Manage custom Universal Login templates
Expand Down
1 change: 1 addition & 0 deletions docs/auth0_universal-login_customize.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ auth0 universal-login customize [flags]
## Related Commands

- [auth0 universal-login customize](auth0_universal-login_customize.md) - Customize the Universal Login experience
- [auth0 universal-login partials](auth0_universal-login_partials.md) - Manage partials for prompts
- [auth0 universal-login prompts](auth0_universal-login_prompts.md) - Manage custom text for prompts
- [auth0 universal-login show](auth0_universal-login_show.md) - Display the custom branding settings for Universal Login
- [auth0 universal-login templates](auth0_universal-login_templates.md) - Manage custom Universal Login templates
Expand Down
16 changes: 16 additions & 0 deletions docs/auth0_universal-login_partials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
layout: default
has_toc: false
has_children: true
---
# auth0 universal-login partials

Manage [partials for prompts](https://auth0.com/docs/customize/universal-login-pages/customize-signup-and-login-prompts)

## Commands

- [auth0 universal-login partials create](auth0_universal-login_partials_create.md) - Create partials for a prompt segment
- [auth0 universal-login partials delete](auth0_universal-login_partials_delete.md) - Delete partials for a prompt segment
- [auth0 universal-login partials show](auth0_universal-login_partials_show.md) - Show partials for a prompt segment
- [auth0 universal-login partials update](auth0_universal-login_partials_update.md) - Update partials for a prompt segment

54 changes: 54 additions & 0 deletions docs/auth0_universal-login_partials_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
layout: default
parent: auth0 universal-login partials
has_toc: false
---
# auth0 universal-login partials create

Create partials for a prompt segment.

## Usage
```
auth0 universal-login partials create [flags]
```

## Examples

```
auth0 universal-login partials create <prompt>
auth0 ul partials create <prompt> --input-file <input-file>
auth0 ul partials create login --input-file /tmp/login/input-file.json
```


## Flags

```
--form-content-end string Content for the Form Content End Partial
--form-content-start string Content for the Form Content Start Partial
--form-footer-end string Content for the Form Footer End Partial
--form-footer-start string Content for the Form Footer Start Partial
--input-file string Path to a file that contains partial definitions for a prompt segment.
--secondary-actions-end string Content for the Secondary Actions End Partial
--secondary-actions-start string Content for the Secondary Actions Start Partial
```


## Inherited Flags

```
--debug Enable debug mode.
--no-color Disable colors.
--no-input Disable interactivity.
--tenant string Specific tenant to use.
```


## Related Commands

- [auth0 universal-login partials create](auth0_universal-login_partials_create.md) - Create partials for a prompt segment
- [auth0 universal-login partials delete](auth0_universal-login_partials_delete.md) - Delete partials for a prompt segment
- [auth0 universal-login partials show](auth0_universal-login_partials_show.md) - Show partials for a prompt segment
- [auth0 universal-login partials update](auth0_universal-login_partials_update.md) - Update partials for a prompt segment


41 changes: 41 additions & 0 deletions docs/auth0_universal-login_partials_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: default
parent: auth0 universal-login partials
has_toc: false
---
# auth0 universal-login partials delete

Delete partials for a prompt segment.

## Usage
```
auth0 universal-login partials delete [flags]
```

## Examples

```
auth0 universal-login partials delete <prompt>
```




## Inherited Flags

```
--debug Enable debug mode.
--no-color Disable colors.
--no-input Disable interactivity.
--tenant string Specific tenant to use.
```


## Related Commands

- [auth0 universal-login partials create](auth0_universal-login_partials_create.md) - Create partials for a prompt segment
- [auth0 universal-login partials delete](auth0_universal-login_partials_delete.md) - Delete partials for a prompt segment
- [auth0 universal-login partials show](auth0_universal-login_partials_show.md) - Show partials for a prompt segment
- [auth0 universal-login partials update](auth0_universal-login_partials_update.md) - Update partials for a prompt segment


42 changes: 42 additions & 0 deletions docs/auth0_universal-login_partials_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
layout: default
parent: auth0 universal-login partials
has_toc: false
---
# auth0 universal-login partials show

Show partials for a prompt segment.

## Usage
```
auth0 universal-login partials show [flags]
```

## Examples

```
auth0 universal-login partials show <prompt>
auth0 ul partials show login
```




## Inherited Flags

```
--debug Enable debug mode.
--no-color Disable colors.
--no-input Disable interactivity.
--tenant string Specific tenant to use.
```


## Related Commands

- [auth0 universal-login partials create](auth0_universal-login_partials_create.md) - Create partials for a prompt segment
- [auth0 universal-login partials delete](auth0_universal-login_partials_delete.md) - Delete partials for a prompt segment
- [auth0 universal-login partials show](auth0_universal-login_partials_show.md) - Show partials for a prompt segment
- [auth0 universal-login partials update](auth0_universal-login_partials_update.md) - Update partials for a prompt segment


54 changes: 54 additions & 0 deletions docs/auth0_universal-login_partials_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
layout: default
parent: auth0 universal-login partials
has_toc: false
---
# auth0 universal-login partials update

Update partials for a prompt segment.

## Usage
```
auth0 universal-login partials update [flags]
```

## Examples

```
auth0 universal-login partials update <prompt>
auth0 ul partials update <prompt> --input-file <input-file>
auth0 ul partials update login --input-file /tmp/login/input-file.json
```


## Flags

```
--form-content-end string Content for the Form Content End Partial
--form-content-start string Content for the Form Content Start Partial
--form-footer-end string Content for the Form Footer End Partial
--form-footer-start string Content for the Form Footer Start Partial
--input-file string Path to a file that contains partial definitions for a prompt segment.
--secondary-actions-end string Content for the Secondary Actions End Partial
--secondary-actions-start string Content for the Secondary Actions Start Partial
```


## Inherited Flags

```
--debug Enable debug mode.
--no-color Disable colors.
--no-input Disable interactivity.
--tenant string Specific tenant to use.
```


## Related Commands

- [auth0 universal-login partials create](auth0_universal-login_partials_create.md) - Create partials for a prompt segment
- [auth0 universal-login partials delete](auth0_universal-login_partials_delete.md) - Delete partials for a prompt segment
- [auth0 universal-login partials show](auth0_universal-login_partials_show.md) - Show partials for a prompt segment
- [auth0 universal-login partials update](auth0_universal-login_partials_update.md) - Update partials for a prompt segment


1 change: 1 addition & 0 deletions docs/auth0_universal-login_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ auth0 universal-login show [flags]
## Related Commands

- [auth0 universal-login customize](auth0_universal-login_customize.md) - Customize the Universal Login experience
- [auth0 universal-login partials](auth0_universal-login_partials.md) - Manage partials for prompts
- [auth0 universal-login prompts](auth0_universal-login_prompts.md) - Manage custom text for prompts
- [auth0 universal-login show](auth0_universal-login_show.md) - Display the custom branding settings for Universal Login
- [auth0 universal-login templates](auth0_universal-login_templates.md) - Manage custom Universal Login templates
Expand Down
1 change: 1 addition & 0 deletions docs/auth0_universal-login_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ auth0 universal-login update [flags]
## Related Commands

- [auth0 universal-login customize](auth0_universal-login_customize.md) - Customize the Universal Login experience
- [auth0 universal-login partials](auth0_universal-login_partials.md) - Manage partials for prompts
- [auth0 universal-login prompts](auth0_universal-login_prompts.md) - Manage custom text for prompts
- [auth0 universal-login show](auth0_universal-login_show.md) - Display the custom branding settings for Universal Login
- [auth0 universal-login templates](auth0_universal-login_templates.md) - Manage custom Universal Login templates
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/PuerkitoBio/rehttp v1.3.0
github.com/auth0/go-auth0 v1.4.0
github.com/auth0/go-auth0 v1.4.1-0.20240201214156-f9765fcec826
github.com/briandowns/spinner v1.23.0
github.com/charmbracelet/glamour v0.6.0
github.com/fsnotify/fsnotify v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/auth0/go-auth0 v1.4.0 h1:oZL3xIBBPW2ckLQmp6BSqpx5RV5yuqqOEVEPp4cipR4=
github.com/auth0/go-auth0 v1.4.0/go.mod h1:X1o5gVvYUYAQltayD5HrLimFZN9tfZUlJDUh+lz8h9I=
github.com/auth0/go-auth0 v1.4.1-0.20240201214156-f9765fcec826 h1:wspJkFQVLCO05U89SlCDANWJssrMhALjfwzM220UvWw=
github.com/auth0/go-auth0 v1.4.1-0.20240201214156-f9765fcec826/go.mod h1:wvUAydnwKdTCCTEgpLlGUA0aQGH1g241ktMEIR6y4+M=
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48=
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA=
github.com/aymanbagabas/go-osc52 v1.0.3 h1:DTwqENW7X9arYimJrPeGZcV0ln14sGMt3pHZspWD+Mg=
Expand Down
57 changes: 0 additions & 57 deletions internal/auth/mock/auth.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions internal/auth0/branding_prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,24 @@ type PromptAPI interface {
//
// See: https://auth0.com/docs/api/management/v2#!/Prompts/put_custom_text_by_language
SetCustomText(ctx context.Context, p string, l string, b map[string]interface{}, opts ...management.RequestOption) (err error)

// CreatePartials creates new custom prompt partials for a given segment.
//
// See: https://auth0.com/docs/sign-up-prompt-customizations#use-the-api-to-edit-custom-prompts
CreatePartials(ctx context.Context, c *management.PartialsPrompt, opts ...management.RequestOption) error

// UpdatePartials updates custom prompt partials for a given segment.
//
// See: https://auth0.com/docs/sign-up-prompt-customizations#use-the-api-to-edit-custom-prompts
UpdatePartials(ctx context.Context, c *management.PartialsPrompt, opts ...management.RequestOption) error

// ReadPartials reads custom prompt partials for a given segment.
//
// See: https://auth0.com/docs/sign-up-prompt-customizations#use-the-api-to-edit-custom-prompts
ReadPartials(ctx context.Context, segment management.PartialsPromptSegment, opts ...management.RequestOption) (c *management.PartialsPrompt, err error)

// DeletePartials deletes custom prompt partials for a given segment.
//
// See: https://auth0.com/docs/sign-up-prompt-customizations#use-the-api-to-edit-custom-prompts
DeletePartials(ctx context.Context, c *management.PartialsPrompt, opts ...management.RequestOption) error
}
Loading
Loading