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

@descope/web-component

Package Overview
Dependencies
Maintainers
4
Versions
351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@descope/web-component

Descope WC

  • 0.0.26-alpha.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-23.67%
Maintainers
4
Weekly downloads
 
Created
Source

@descope/web-component

Create your login pages on our console-app, once done, you can use this library to inject those pages to your app
it registers- a web component and update the web-component content based on the relevant page, See usage example below

Usage

Install the package

npm install @descope/web-component

As a library

import '@descope/web-component'
import { DescopeWc } // in case you need types definition or you want to use the class directly

//render a custom element, for example:
render(){
  return (
    <descope-wc project="myProjectId"/>
  )
}

In HTML file

  • Copy the file @descope/web-js/sdk/dist/descope-wc.js and place it where your HTML file is located

  • Add the following script tag to your HTML file

<head>
  <script src="./my-lib.umd.production.min.js"></script>
</head>
  • Now you can add the custom element to your HTML
<descope-wc project-id="<project-id>" flow-id="<flow-id>"></descope-wc>

Run the demo app

  • Install dependencies - npm i
  • Edit the src/app/index.html - replace <project-id> and <project-id> with your project and a flow
  • Run application - npm run start

TODO: we shoud host this file so it can be included without installing the package, once we will publish it to a public registry, we can also use unpkg.com/ to serve it

FAQs

Package last updated on 07 Oct 2022

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