auth

Widget ❌ Theme ✅ Options ✅ Content & Translations

This component is not a layout-component but componentOptions in the auth object at widget level.

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:

OptionDescriptionExample

backgroundColor

Button background and link color

color

Button text color

modal

Style of the Login Modal and the container (box)

image

Logo in the Login Modal

incorrectEmailText

Error message in case of invalid format of email address prompted (By default * Your email address is incorrect).

titleText

Title of Login modal (By default * Manage your consents)

stepOneGuideLineText

Second title of Login modal in email address step (By default * Please login in)

OTP Login modal

OptionDescriptionExample

otpLoginResendLink

Container of send a new code (<a>).

sendNewCodeButtonText

Text of button to send a new code.

otpLoginDescriptionStepTwo

Description above the code input to guide the user.

codeNotValidErrorMessage

Error message displayed to the user when the code prompted is not valid.

verifyCodeButton

Button in step 2 to submit the code.

otpLoginDescriptionStepOne

Description above the email input to guide the user.

authButton

loader

Loader in the submit button displayed when waiting for response.

descriptionTextWrapper

Container of description text positioned above email and code inputs.

codeFormFieldOptions

Code input options.

emailFormFieldOptions

Email address input options.

OptionDescriptionExample

resendEmailText

Text button to re-send email

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? )

stepTwoGuideLineText

Secondary title of Login modal in confirmation step (By default * A link is on it's way)

inputLabelText

Label of email input (By default * Email address)

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

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
  }
}

Last updated