Test Users with Management SDKs
The management SDK requires a management key, which can be generated here.
You can use Descope management SDK for common test user management operations.
Install SDK
Import and initialize Management SDK
Create Test User
This operation creates a new test user within the project with the details provided.
Generate OTP For Test User
This operation generates an OTP code for authenticating a test user.
Note that signin is not complete without the user verification step, which can be performed using the backend SDKs.
Generate Magic Link For Test User
This operation generates an Magic Link for authenticating a test user. The response contains the link, which contains the token needed to verify the user within the user verification step, which can be performed using the backend SDKs. The token arrives as a query parameter named 't' which can be parse out of the link, see examples below.
Generate Enchanted Link For Test User
This operation generates an Enchanted Link for authenticating a test user.
The generate Enchanted Link for test user call returns a pendingRef
and a link
. Parse the link to capture the token, then utilize the
backend SDK to verify the token. You will also
need to utilize the pendingRef
to poll for verification status in order to receive the test user's JWT.
Generate Embedded Link For Test User
This operation generates an Embedded Link for authenticating a test user. The response returns the token to be used in the user verification step, which can be performed using the backend SDKs.
Delete a Test User
This operation allows administrators to delete an existing test user. This action will delete the users forever and they will not be recoverable.
Delete All Test Users
This operation deletes all test users within the project. This action will delete these users forever and they will not be recoverable.