Navigation
Open a challenge
Attach a device to a user.
Parameters
challenge_id
string REQUIRED
The challenge ID.
redirect_urls
object
The options for the challenge.
Child parameters
redirect_urls.success_url
string
The redirect url used when the challenge is completed. If not provided, the user will be redirected to the current page. The success url will contain the challenge_id as a query parameter.
channel
string
The channel to automatically use for the challenge. channel
can be email
or text
. If provided, the user will skip the channel selection step and the challenge will be sent to the provided channel. If not provided, the user will be asked to select a channel.
debug
boolean
A boolean indicating whether to run in debug mode or not. If debug is true
, any errors will be printed to the console as well as warnings and recommendations.
Returns
Returns null.
import { challenge } from 'rupt';
challenge({
challenge_id: "challenge_id",
redirect_urls: {
success_url: "https://example.com/success",
},
channel: "text",
debug: true,
})
Response
null