Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@authenticins/widget

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@authenticins/widget

A plug and play embedded widget for Authentic's Insurance Portal.

  • 3.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
451
increased by58.8%
Maintainers
1
Weekly downloads
 
Created
Source

Authentic Widget

A plug and play embedded widget for Authentic's Insurance Portal.

Installation

Add the following script tag to the <head> of your index.html file.

<script type="module" src="https://www.unpkg.com/@authenticins/widget@latest/dist/authenticWidget.js"></script>
Usage

Once installed, the widget script will expose controls to the browser window. You can configure the widget's look and behavior on initialization (see the full WidgetConfig definition below).

<script>
  window.addEventListener("load", () => {
    window.authenticWidget.init({
      insurancePortal: { url: "https://example-tenant-name.prod.authenticinsurance.com" },
      prefillData: {
        lead: { email: "johndoe@email.com" }
      },
      themeOverrides: {
        primaryColor: "#000000",
        borderRadiusPx: 6,
        brand: {
          name: "Example Tenant Name",
          logoUrls: {
            darkBg: "https://example-tenant-website.com/logo-white.png",
            lightBg: "https://example-tenant-website.com/logo-black.png"
          },
          faviconUrl: "https://example-tenant-website.com/favicon.ico"
        }
      }
    });
  });
</script>
Configuration
interface WidgetConfig {
  insurancePortal?: {
    url?: string;
    // The CSS selector for the target element you want the Insurance Portal injected into.
    // If no target selector is provided, the widget will inject its default persistent banner and modal.
    targetSelector?: string;
  };
  customerId?: string;
  prefillData?: {
    lead?: {
      email?: string;
      businessClassCode?: string;
      stateCodes?: string[];
      productIds?: string[];
    };
    responses?: {
      exposures?: Array<{
        id: number;
        exposureName: string;
        // Where each key is a field's name mapped to its value (e.g. ['BUSINESS_LEGAL_NAME']: 'Example Business Name');
        fieldValues: Record<string, string>;
      }>;
      // Same as format described above.
      questions?: Record<string, string>;
    };
  };
  themeOverrides?: {
    useDarkMode?: boolean;
    primaryColor?: string;
    secondaryColor?: string;
    borderRadiusPx?: number;
    brand?: {
      name?: string;
      logoUrls?: {
        darkBg?: string;
        lightBg?: string;
      };
      faviconUrl?: string;
    };
  };
}

FAQs

Package last updated on 07 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc