Didomi - Developers documentation
  • Introduction
  • SDKs
    • Introduction
    • Web SDK
      • Getting started
      • Tags and vendors management
        • Tags management
          • Events & Variables
            • Deprecated
            • Custom events
          • Tag managers
            • Adobe Launch/DTM
            • Eulerian
            • Google Tag Manager
              • Configure the Didomi / GTM integration
              • Didomi's GTM template
            • Tealium
            • Other tag managers
        • Custom Didomi <script> tags
        • Third-party integrations
          • Google Ad Manager / AdSense
            • GDPR via Non-Personalized Ads
              • Share consent and load/refresh ads
              • Share consent without loading or refreshing ads
            • US states laws
          • Google Consent Mode V2
          • Kameleoon
          • Piano Analytics (AT Internet)
          • Prebid
            • GDPR via IAB TCF
            • US states laws
          • Salesforce DMP (Krux)
        • IAB frameworks
        • Programmatic API
      • Configuration
        • Bots (SEO & Performance tools)
        • Configuration by URL
        • Cookies and storage
        • Custom domains for events
        • Notice
          • Behavior
          • Interactions
          • Look and feel
        • Preferences
        • Theme
      • AB tests
      • Custom domain
        • Domain delegation
        • Reverse proxy
      • Share consents between domains
      • Share consents across devices
      • Pass user choices in query string
      • Serve Didomi assets from your domain
      • Reference
        • API
          • Deprecated
        • Events
      • Performance
      • Versions
    • Mobile and TV SDKs
      • Android and Android TV
        • Setup
        • Logging
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • iOS and tvOS
        • Setup
        • Logging
        • App Tracking Transparency (iOS 14.5+)
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • Unity
        • Setup
        • Reference
        • Versions
        • Troubleshooting
      • React Native
        • Setup
        • Reference
          • Deprecated
        • Versions
      • Flutter
        • Setup
        • Reference
        • Versions
      • Consent notice
        • Getting started
        • Customize the notice
        • Customize the preferences popup
        • Customize the theme & UI
        • Load notice by ID
      • Third-party SDKs
      • Share consents across devices
      • Share consent with WebViews
      • Google Consent Mode v2
      • FAQ
    • AMP SDK
      • Blocking Behaviors
        • Load immediately on page load
        • Load only after consent (positive or negative)
        • Load only after positive consent
      • Consent status for vendors
    • Help & Support
  • API
    • Introduction
      • Authentication
      • Errors
      • Pagination
      • Filters
      • Caching
      • Rate limiting
      • Quotas
      • Translations
    • Data Manager
      • Regulations
      • Configuration Tree
      • Purposes
        • Purposes & Vendors Numerical IDs
      • Preferences Library
      • User Rights
    • Widgets
      • Consent notices
        • Notices
        • Configurations
        • Multi-Regulation Configurations
          • Migration of Existing Notices and API Updates
        • Deployments
        • Tutorials
          • Create and publish a consent notice
          • Create and publish a multi-regulation consent notice
      • Privacy widgets
        • Create a widget
        • Retrieve widgets
        • Edit a widget
          • Content & Design
            • Themes & Shapes
            • Components
              • auth
              • dsar_form
              • footer
              • header
              • preference
              • preference_value
              • save
              • section
              • sections
            • Options
          • Purposes & preferences
          • Settings
        • Deploy a Widget
          • Use your own subdomain
          • Use your own domain
          • Implement an embeddable widget on your website
        • Authentication
          • Manage authentication providers
          • Authenticate your end-user
        • Archive a widget
        • Headless widgets
          • Public Methods
          • Custom elements
          • Custom events
          • Event listeners
        • Tutorial
          • Launch a Preference Center from a mobile app
    • Compliance Reports
      • Properties
      • Reports
      • CSV format reference
      • Websites
    • Consents and Preferences
      • Events
        • Generate IAB TCF consent string
      • Links
      • Proofs
      • Tokens
      • Secrets
      • Users
      • Tutorial
        • Collect and operate data
    • Privacy Requests
      • Requests
      • Notes
      • Links
      • Emails
  • Integrations
    • Introduction
      • Quotas
    • Generic integrations
      • Batch export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
        • Exported data
          • Notices consents
        • Logs
      • Webhooks
      • Batch import
      • Analytics export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
    • Third-party apps
      • CMP integrations
        • Didomi-mParticle integration for your CMP
        • Deploy Didomi’s SDK for your Adobe Commerce website
      • Preference Management Platform integrations
        • Actito
        • Adobe Campaign Classic
        • Adobe Experience Cloud
        • Adobe Marketo Engage
        • Adobe Source Connector
        • Braze
        • Dotdigital
        • Hubspot
        • Mailchimp
        • Microsoft Dynamics 365
        • Salesforce Marketing Cloud
        • Salesforce Sales & Service Cloud
        • Selligent
        • Brevo (ex Sendinblue)
    • Tutorials
      • Configure a HTTP webhook
      • Configure a batch export
      • Configure an analytics export
    • Emailing
      • Configurations
        • Actito Email
        • Actito SMS
        • Adobe Campaign Classic
        • Adobe Campaign Standard
      • Emails
        • Templates
        • Manage your templates
Powered by GitBook
On this page
  • Manage authentication providers
  • Create a provider
  • Set a default provider
  • Manage authentication within a widget
  1. API
  2. Widgets
  3. Privacy widgets
  4. Authentication

Manage authentication providers

PreviousAuthenticationNextAuthenticate your end-user

Last updated 2 months ago

This documentation explains how to configure your own providers to authenticate end-users in the Consents API. This section shows how to create a new provider, set it as the default provider for your organization, and use one or multiple providers in your widgets.

Manage authentication providers

Create a provider

A default provider of type otp is attached your organization (except if you have subscribed to Didomi before the 4th of July 2023).

It will allow our system to send an email to your end-user when he authenticates from a widget or to the Didomi API through the /auth/initiate endpoint.

You can also create an Magic Link provider in order to provide a one-step less journey to your end-users. Note that this method includes a token in a link and might be less secured than the One-Time Password workflow.

Create an One-Time Password provider

To create an One-Time Password provider, you can send a POST request to /auth-providers. You need to specify the following values.

POST https://api.didomi.io/auth-providers

{
    "type": "otp",
    "organization_id": "YOUR_ORGANIZATION_ID",
    // To set as default provider of the organization
    "is_default": true
}

Create a Magic Link provider

To create a Magic Link provider, you can send a POST request to /auth-providers. You need to specify the following values.

POST https://api.didomi.io/auth-providers

{
    "type": "message",
    "organization_id": "YOUR_ORGANIZATION_ID"
    // To set as default provider of the organization
    "is_default": true    
}

Set a default provider

A dedicated property is_default could be set within auth provider’s payload to mark the selected auth provider as a default one.

To set a provider as your default provider, you can send a PATCH request to /auth-providers/id.

You need to set the is_default property to true and specify the type of your provider which can be either otp or message.

PATCH https://api.didomi.io/auth-providers/{id}

{
    "type": "otp",
    "is_default": true
}

If you have already one default provider and you create a new one with is_default set to true, then the other provider will be switched to false automatically.

Manage authentication within a widget

Authentication configuration is available at widget level. When you create a widget, depending on the template used, a authentication configuration is set. To edit the authentication configuration, you need to send a PATCH request on /widgets/{id} endpoint.

Property
Type
Description

method

String

Method used by the widget to authenticate the end-user. Options available are email and null.

componentOptions

Object

Options to configure the Login component.

hideIfNotAuthenticated

Boolean

Hide the widget when the end-user is not authenticated. (Prevents from displaying an empty widget when authentication is not processed)

providerId

String

In case of multiple authentication provider, to use a different provider than the default provider, set the providerId of the authentication provider you want to use.

Be careful when you are editing the auth property. This is a JSONB and by design, you need to fill in every property already added every time you edit this object.

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

{
    "auth": {
        "method": "email",
        "componentOptions": {},
        "hideIfNotAuthenticated": false,
        "providerId": "PROVIDER_ID"
    }
}

Note that if you choose to set the method to null, you have to support authentication on your side. To do so, please follow our dedicated .

documentation
Manage authentication providers
Manage authentication within a widget