Descope Components
Descope Components are components used to render Descope Flows and provide context in your application. This includes the UI elements and logic as defined in your project console.
Client SDK
Install SDK
Import and initialize SDK
Customization
Descope Component
Customize the Descope Component by passing in the following props:
Default Flows
Use default flow components that render the Descope component with a predefined flow ID.
Auth Provider
Passing sessionTokenViaCookie prop to AuthProvider component. Descope SDK will automatically store session token on the DS cookie.
Note
Use this option if session token will stay small (less than 1k). Session token can grow, especially in cases of using authorization, or adding custom claims
Now, whenever you call fetch, the cookie will automatically be sent with the request. Descope backend SDKs also support extracting the token from the DS cookie.
Note
The session token cookie is set as a Secure cookie. It will be sent only over HTTPS connections. In addition, some browsers (e.g. Safari) may not store Secure cookie if the hosted page is running on an HTTP protocol.
Widgets
Widgets are Descope components that let you delegate user operations to your customers. Whether the implementation is tenant-based or not,
The Descoper can embed those components inside his website to allow his customers to perform self-service in various operations.
Here is an example of the UserManagement
widget implementation, using the react SDK:
You can read on further Widget types and implementation methods here.