> For the complete documentation index, see [llms.txt](https://developers.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/components/auth.md).

# auth

`Widget` ❌ Theme ✅ Options ✅ Content & Translations

{% hint style="info" %}
This component is not a layout-component but componentOptions in the `auth` object at widget level.
{% endhint %}

To edit the Look & Feel of the Login Modal, send a **PATCH** request on `/widgets/{id}` and specify the following options in the `componentOptions` object property:

#### Common to One-Time Password and Magic Link Login modals

| Option                 | Description                                                                                                          | Example                                                                                                                            |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `backgroundColor`      | Button background and link color                                                                                     | [ComponentOptionValue](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#componentoptionvalue) |
| `color`                | Button text color                                                                                                    | [ComponentOptionValue](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#componentoptionvalue) |
| `modal`                | Style of the Login Modal and the container (`box`)                                                                   | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                   |
| `image`                | Logo in the Login Modal                                                                                              | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                   |
| `incorrectEmailText`   | Error message in case of invalid format of email address prompted (By default \* `Your email address is incorrect`). | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)       |
| `titleText`            | Title of Login modal (By default *\** `Manage your consents`)                                                        | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)       |
| `stepOneGuideLineText` | Second title of Login modal in email address step (By default *\** `Please login in`)                                | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)       |

#### OTP Login modal

| Option                       | Description                                                              | Example                                                                                                                                 |
| ---------------------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `otpLoginResendLink`         | Container of send a new code (`<a>`).                                    | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                        |
| `sendNewCodeButtonText`      | Text of button to send a new code.                                       | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)            |
| `otpLoginDescriptionStepTwo` | Description above the code input to guide the user.                      | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)            |
| `codeNotValidErrorMessage`   | Error message displayed to the user when the code prompted is not valid. | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)            |
| `verifyCodeButton`           | Button in step 2 to submit the code.                                     | [DidomiButtonOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomibuttonoptions)        |
| `otpLoginDescriptionStepOne` | Description above the email input to guide the user.                     | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)            |
| `authButton`                 |                                                                          | [DidomiButtonOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomibuttonoptions)        |
| `loader`                     | Loader in the submit button displayed when waiting for response.         | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                        |
| `descriptionTextWrapper`     | Container of description text positioned above email and code inputs.    | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                        |
| `codeFormFieldOptions`       | Code input options.                                                      | [DidomiFormFieldsOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomiformfieldoptions) |
| `emailFormFieldOptions`      | Email address input options.                                             | [DidomiFormFieldsOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomiformfieldoptions) |

#### Magic Link Login modal

| Option                 | Description                                                                                                                                                   | Example                                                                                                                      |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `resendEmailText`      | Text button to re-send email                                                                                                                                  | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions) |
| `linkSentInfoText`     | Email sent confirmation (By default *\** `A link to manage your consents has been sent to you, please check your email address. Haven't received anything?` ) | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions) |
| `stepTwoGuideLineText` | Secondary title of Login modal in confirmation step (By default *\** `A link is on it's way`)                                                                 | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions) |
| `inputLabelText`       | Label of email input (By default *\** `Email address`)                                                                                                        | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions) |

*\* Available by default if SDK is used. When building the authentication workflow with Didomi APIs, translations from SDK will not be available.*

```json
PATCH https://api.didomi.io/widgets/{id}?organization_id=YOUR_ORG_ID

{
  "auth": {
      "method": "email",
      "providerId": "",
      "componentOptions": {
          "backgroundColor": "",
          "color": "",
          "modal": {
              "style": {
                  "default": {
                      "backgroundColor": "",
                      "padding": "",
                      "borderRadius": "",
                      "borderWidth": ""
                  }
              },
              "box": {
                  "style": {
                      "default": {
                          "backgroundColor": "",
                          "padding": "",
                          "borderRadius": "",
                          "borderWidth": ""
                      }
                  }                    
              }
          },
          "image": {
              "src": "",
              "style": {
                      "default": {
                          "width": "",
                          "height": ""
                      }
              }           
          },
          "incorrectEmailText": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }
          },
          "inputLabelText": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }                
          },
          "titleText": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }                
          },
          "stepOneGuideLineText": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }                
          },
          "otpLoginResendLink": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }                       
          },
          "sendNewCodeButtonText": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }                
          },
          "otpLoginDescriptionStepTwo": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }                
          },
          "codeNotValidErrorMessage": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }                
          },
          "verifyCodeButton": {
              "style": {
                  "default": {
                  "backgroundColor": "",
                  "padding": "",
                  "borderRadius": ""
                  }
              },
              "text": {
                  "style": {
                      "default": {
                          "color": "",
                          "fontSize": ""
                      }
                  }
              }                
          },
          "otpLoginDescriptionStepOne": {
              "style": {
                  "default": {
                      "color": "",
                      "fontSize": ""
                  }
              }              
          },
          "authButton": {
              "style": {
                  "default": {
                  "backgroundColor": "",
                  "padding": "",
                  "borderRadius": ""
                  }
              },
              "text": {
                  "style": {
                      "default": {
                          "color": "",
                          "fontSize": ""
                      }
                  }
              }                
          },
          "descriptionTextWrapper": {
              "style": {
                  "default": {
                      "backgroundColor": ""
                  }
              }                
          },
          "codeFormFieldOptions": {
              "label": {
                  "style": {
                      "default": {
                          "color": ""
                      }                
                  }
              },
              "errorMessage": {
                  "style": {
                      "default": {
                          "color": ""
                      }                
                  }                
              },
              "inputOptions": {
                  "fontColor": "",
                  "fontSize": "",
                  "fontWeight": "",
                  "lineHeight": "",
                  "borderRadius": "",
                  "borderColor": "",
                  "borderWidth": "",
                  "errorBorderColor": "",
                  "placeholderColor": "",
                  "backgroundColor": ""
              }                
          },
          "emailFormFieldOptions": {
              "label": {
                  "style": {
                      "default": {
                          "color": ""
                      }                
                  }
              },
              "errorMessage": {
                  "style": {
                      "default": {
                          "color": ""
                      }                
                  }                
              },
              "inputOptions": {
                  "fontColor": "",
                  "fontSize": "",
                  "fontWeight": "",
                  "lineHeight": "",
                  "borderRadius": "",
                  "borderColor": "",
                  "borderWidth": "",
                  "errorBorderColor": "",
                  "placeholderColor": "",
                  "backgroundColor": ""
              }
          }
      },
      "hideIfNotAuthenticated": false
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/components/auth.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
