@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 }
render(){
return (
<descope-wc project="myProjectId"/>
)
}
In 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 should 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