[{"data":1,"prerenderedAt":1152},["ShallowReactive",2],{"docs-nav-\u002Fdocs\u002Faccount-takeover\u002Fmigrations\u002Fmigrate-from-identify-to-evaluate":3,"\u002Fdocs\u002Faccount-takeover\u002Fmigrations\u002Fmigrate-from-identify-to-evaluate":45},[4],{"title":5,"path":6,"stem":7,"children":8,"page":26},"Account Takeover","\u002Fdocs\u002Faccount-takeover","1.docs\u002F3.account takeover",[9,13,17,27,36],{"title":10,"path":11,"stem":12},"How it works","\u002Fdocs\u002Faccount-takeover\u002Fhow-account-takeover-protection-works","1.docs\u002F3.account takeover\u002F0.how-account-takeover-protection-works",{"title":14,"path":15,"stem":16},"Quick start","\u002Fdocs\u002Faccount-takeover\u002Fquick-start","1.docs\u002F3.account takeover\u002F1.quick start",{"title":18,"path":19,"stem":20,"children":21,"page":26},"Concepts","\u002Fdocs\u002Faccount-takeover\u002Fconcepts","1.docs\u002F3.account takeover\u002F2.Concepts",[22],{"title":23,"path":24,"stem":25},"Evaluations","\u002Fdocs\u002Faccount-takeover\u002Fconcepts\u002Fevaluations","1.docs\u002F3.account takeover\u002F2.Concepts\u002F0.evaluations",false,{"title":28,"path":29,"stem":30,"children":31,"page":26},"Advanced","\u002Fdocs\u002Faccount-takeover\u002Fadvanced","1.docs\u002F3.account takeover\u002F3.Advanced",[32],{"title":33,"path":34,"stem":35},"Custom implementation","\u002Fdocs\u002Faccount-takeover\u002Fadvanced\u002Fcustom-implementation","1.docs\u002F3.account takeover\u002F3.Advanced\u002F1.custom-implementation",{"title":37,"path":38,"stem":39,"children":40,"page":26},"Migrations","\u002Fdocs\u002Faccount-takeover\u002Fmigrations","1.docs\u002F3.account takeover\u002F4.migrations",[41],{"title":42,"path":43,"stem":44},"Identify → Evaluations","\u002Fdocs\u002Faccount-takeover\u002Fmigrations\u002Fmigrate-from-identify-to-evaluate","1.docs\u002F3.account takeover\u002F4.migrations\u002F0.Migrate-from-identify-to-evaluate",{"id":46,"title":42,"body":47,"description":167,"extension":1146,"meta":1147,"navigation":1148,"path":43,"seo":1149,"sitemap":1150,"stem":44,"__hash__":1151},"docs\u002F1.docs\u002F3.account takeover\u002F4.migrations\u002F0.Migrate-from-identify-to-evaluate.md",{"type":48,"value":49,"toc":1137},"minimark",[50,55,60,64,81,84,87,95,105,109,116,120,125,146,152,156,330,334,370,463,478,657,721,732,804,823,837,848,866,903,939,944,954,994,1038,1045,1058,1092,1127,1133],[51,52,54],"h1",{"id":53},"migrate-from-identify-to-evaluations","Migrate from Identify to Evaluations",[56,57,59],"h2",{"id":58},"background","Background",[61,62,63],"p",{},"Rupt's device intelligence technology has been split into two separate sub-technologies:",[65,66,67,75],"ul",{},[68,69,70],"li",{},[71,72,74],"a",{"href":73},"\u002Fplatform\u002Fdevice-identification","Device Identification",[68,76,77],{},[71,78,80],{"href":79},"\u002Fplatform\u002Fbrowser-fingerprinting","Fingerprinting",[61,82,83],{},"Device Identification is a proprietary technology primarily used for account sharing detection and prevention. Fingerprinting on the other hand is more suited for account takeover detection and prevention.",[61,85,86],{},"Previous versions of Rupt's device identification technology supported account takeover detection and prevention with similar accuracy to fingerprinting. However, to squeeze more benefit for account takeover scenarios, it's better to utilize our fingerprinting technology.",[61,88,89,90,94],{},"To simplify the code integration, we've unified all of the assessments into a single ",[91,92,93],"code",{},"evaluate"," function from the front end package and included fully documented APIs to handle the server side logic.",[61,96,97,98,101,102,104],{},"This guide explains how to migrate from the previous ",[91,99,100],{},"Identify"," APIs to the new and improved ",[91,103,93],{}," APIs.",[56,106,108],{"id":107},"account-takeover-protection-flow","Account takeover protection flow",[61,110,111],{},[112,113],"img",{"alt":114,"src":115},"Account takeover flow","\u002Fimg\u002Fdocs\u002Faccount-takeover-flow.png",[56,117,119],{"id":118},"migration-steps","Migration steps:",[121,122,124],"h3",{"id":123},"rupt-dashboard-settings","Rupt dashboard settings",[126,127,128,139],"ol",{},[68,129,130,131,134,135,138],{},"From your dashboard settings, navigate to the ",[91,132,133],{},"Account takeover"," section and enable ",[91,136,137],{},"Account takeover protection",".",[68,140,141,142,145],{},"Turn off ",[91,143,144],{},"Managed challenge page"," so that you can handle the challenges page yourself.",[61,147,148],{},[112,149],{"alt":150,"src":151},"Account takeover protection settings","\u002Fimg\u002Fdocs\u002Faccount-takeover-setting.png",[121,153,155],{"id":154},"front-end","Front end",[126,157,158,265],{},[68,159,160,161,209,212,213,248,263],{},"Update the Rupt package to the latest version.",[162,163,164,192],"code-tabs",{},[165,166,168],"template",{"v-slot:yarn":167},"",[169,170,174],"pre",{"className":171,"code":172,"language":173,"meta":167,"style":167},"language-sh shiki shiki-themes one-dark-pro monokai","yarn upgrade rupt@latest\n","sh",[91,175,176],{"__ignoreMap":167},[177,178,181,185,189],"span",{"class":179,"line":180},"line",1,[177,182,184],{"class":183},"sUpKv","yarn",[177,186,188],{"class":187},"sgpKs"," upgrade",[177,190,191],{"class":187}," rupt@latest\n",[165,193,194],{"v-slot:npm":167},[169,195,197],{"className":171,"code":196,"language":173,"meta":167,"style":167},"npm install rupt@latest\n",[91,198,199],{"__ignoreMap":167},[177,200,201,204,207],{"class":179,"line":180},[177,202,203],{"class":183},"npm",[177,205,206],{"class":187}," install",[177,208,191],{"class":187},[210,211],"br",{},"Alternatively, to always use the latest minor version of Rupt, you can import the package from a CDN:",[169,214,218],{"className":215,"code":216,"language":217,"meta":167,"style":167},"language-html shiki shiki-themes one-dark-pro monokai","\u003Cscript src=\"https:\u002F\u002Fcdn.rupt.dev\u002Fjs\u002Frupt.js\">\u003C\u002Fscript>\n","html",[91,219,220],{"__ignoreMap":167},[177,221,222,226,230,234,237,240,243,245],{"class":179,"line":180},[177,223,225],{"class":224},"sFXR2","\u003C",[177,227,229],{"class":228},"s2zKK","script",[177,231,233],{"class":232},"spIlZ"," src",[177,235,236],{"class":224},"=",[177,238,239],{"class":187},"\"https:\u002F\u002Fcdn.rupt.dev\u002Fjs\u002Frupt.js\"",[177,241,242],{"class":224},">\u003C\u002F",[177,244,229],{"class":228},[177,246,247],{"class":224},">\n",[249,250,252],"alert",{"type":251},"tip",[61,253,254,255,258,259,262],{},"When using HTML script tags, be sure to wait for the script to be loaded. Rupt will be injected into the ",[91,256,257],{},"window"," so you can use ",[91,260,261],{},"window.Rupt"," instead of Rupt.",[210,264],{},[68,266,267,268,271,272,275,276,323,325,326],{},"Replace the ",[91,269,270],{},".identify"," calls with ",[91,273,274],{},"Rupt.getHash"," to get a client-side browser fingerprint hash.",[169,277,281],{"className":278,"code":279,"language":280,"meta":167,"style":167},"language-js shiki shiki-themes one-dark-pro monokai","const [fingerprint, lastFingerprint] = await Rupt.getHash();\n","js",[91,282,283],{"__ignoreMap":167},[177,284,285,289,292,296,299,302,305,308,312,315,317,320],{"class":179,"line":180},[177,286,288],{"class":287},"sfrnW","const",[177,290,291],{"class":224}," [",[177,293,295],{"class":294},"syDQ0","fingerprint",[177,297,298],{"class":224},", ",[177,300,301],{"class":294},"lastFingerprint",[177,303,304],{"class":224},"] ",[177,306,236],{"class":307},"sBBc0",[177,309,311],{"class":310},"sqnWQ"," await",[177,313,314],{"class":294}," Rupt",[177,316,138],{"class":224},[177,318,319],{"class":183},"getHash",[177,321,322],{"class":224},"();\n",[210,324],{},"This returns a fingerprint hash array containing the current fingerprint and the last saved fingerprint. ",[327,328,329],"strong",{},"Send these hashes to the server side separately in your authentication flow.",[121,331,333],{"id":332},"server-side","Server side",[335,336,339,340],"div",{"className":337},[338],"relative","\n  ",[335,341,346,347,346,353,339],{"className":342},[343,344,345],"absolute","right-0","top-[-40px]","\n    ",[177,348,352],{"className":349},[350,351],"text-sm","pr-2","Language",[354,355,360,361,360,366,346],"select",{"id":356,"className":357},"languageSelect",[354,358,359],"select-bordered","select-sm","\n      ",[362,363,365],"option",{"value":364},"node","Node",[362,367,369],{"value":368},"curl","cURL",[335,371,374,379,412,417],{"className":372},[373],"language-node",[126,375,376],{},[68,377,378],{},"Include the Rupt Node SDK:",[169,380,384],{"className":381,"code":382,"language":383,"meta":167,"style":167},"language-bash shiki shiki-themes one-dark-pro monokai","yarn add @ruptjs\u002Fcore\n#OR\nnpm install @ruptjs\u002Fcore\n","bash",[91,385,386,396,403],{"__ignoreMap":167},[177,387,388,390,393],{"class":179,"line":180},[177,389,184],{"class":183},[177,391,392],{"class":187}," add",[177,394,395],{"class":187}," @ruptjs\u002Fcore\n",[177,397,399],{"class":179,"line":398},2,[177,400,402],{"class":401},"sDDnO","#OR\n",[177,404,406,408,410],{"class":179,"line":405},3,[177,407,203],{"class":183},[177,409,206],{"class":187},[177,411,395],{"class":187},[126,413,414],{"start":398},[68,415,416],{},"Initialize the Rupt Node SDK with your project API secret:",[169,418,420],{"className":278,"code":419,"language":280,"meta":167,"style":167},"import Rupt from \"@ruptjs\u002Fcore\";\nconst rupt = new Rupt(\"API_SECRET\");\n",[91,421,422,439],{"__ignoreMap":167},[177,423,424,427,430,433,436],{"class":179,"line":180},[177,425,426],{"class":310},"import",[177,428,314],{"class":429},"sskXI",[177,431,432],{"class":310}," from",[177,434,435],{"class":187}," \"@ruptjs\u002Fcore\"",[177,437,438],{"class":224},";\n",[177,440,441,443,446,449,452,454,457,460],{"class":179,"line":398},[177,442,288],{"class":287},[177,444,445],{"class":294}," rupt",[177,447,448],{"class":307}," =",[177,450,451],{"class":310}," new",[177,453,314],{"class":183},[177,455,456],{"class":224},"(",[177,458,459],{"class":187},"\"API_SECRET\"",[177,461,462],{"class":224},");\n",[61,464,465,469,474,475,477],{},[177,466,468],{"className":467},[373],"3.",[177,470,473],{"className":471},[472],"language-curl","1."," In your authentication flow, call the ",[91,476,93],{}," method using the login action and the fingerprint hash and other user information:",[335,479,481],{"className":480},[373],[169,482,484],{"className":278,"code":483,"language":280,"meta":167,"style":167},"const res = await rupt.evaluate({\n  action: \"login\",\n  user: \"USER_ID\",\n  fingerprint: FINGERPRINT_HASH, \u002F\u002F First value from getHash() (current fingerprint)\n  last_fingerprint: LAST_FINGERPRINT_HASH, \u002F\u002F Second value from getHash() (last saved fingerprint)\n  version: \"2.32.0\",\n  ip: \"IP_ADDRESS\", \u002F\u002F Optional\n  email: \"EMAIL\", \u002F\u002F Optional\n  phone: \"PHONE\", \u002F\u002F Optional\n  metadata: {\n    key: \"value\",\n  },\n});\n",[91,485,486,506,520,532,548,564,577,593,608,623,632,645,651],{"__ignoreMap":167},[177,487,488,490,493,495,497,499,501,503],{"class":179,"line":180},[177,489,288],{"class":287},[177,491,492],{"class":294}," res",[177,494,448],{"class":307},[177,496,311],{"class":310},[177,498,445],{"class":294},[177,500,138],{"class":224},[177,502,93],{"class":183},[177,504,505],{"class":224},"({\n",[177,507,508,511,514,517],{"class":179,"line":398},[177,509,510],{"class":429},"  action",[177,512,513],{"class":224},": ",[177,515,516],{"class":187},"\"login\"",[177,518,519],{"class":224},",\n",[177,521,522,525,527,530],{"class":179,"line":405},[177,523,524],{"class":429},"  user",[177,526,513],{"class":224},[177,528,529],{"class":187},"\"USER_ID\"",[177,531,519],{"class":224},[177,533,535,538,540,543,545],{"class":179,"line":534},4,[177,536,537],{"class":429},"  fingerprint",[177,539,513],{"class":224},[177,541,542],{"class":294},"FINGERPRINT_HASH",[177,544,298],{"class":224},[177,546,547],{"class":401},"\u002F\u002F First value from getHash() (current fingerprint)\n",[177,549,551,554,556,559,561],{"class":179,"line":550},5,[177,552,553],{"class":429},"  last_fingerprint",[177,555,513],{"class":224},[177,557,558],{"class":294},"LAST_FINGERPRINT_HASH",[177,560,298],{"class":224},[177,562,563],{"class":401},"\u002F\u002F Second value from getHash() (last saved fingerprint)\n",[177,565,567,570,572,575],{"class":179,"line":566},6,[177,568,569],{"class":429},"  version",[177,571,513],{"class":224},[177,573,574],{"class":187},"\"2.32.0\"",[177,576,519],{"class":224},[177,578,580,583,585,588,590],{"class":179,"line":579},7,[177,581,582],{"class":429},"  ip",[177,584,513],{"class":224},[177,586,587],{"class":187},"\"IP_ADDRESS\"",[177,589,298],{"class":224},[177,591,592],{"class":401},"\u002F\u002F Optional\n",[177,594,596,599,601,604,606],{"class":179,"line":595},8,[177,597,598],{"class":429},"  email",[177,600,513],{"class":224},[177,602,603],{"class":187},"\"EMAIL\"",[177,605,298],{"class":224},[177,607,592],{"class":401},[177,609,611,614,616,619,621],{"class":179,"line":610},9,[177,612,613],{"class":429},"  phone",[177,615,513],{"class":224},[177,617,618],{"class":187},"\"PHONE\"",[177,620,298],{"class":224},[177,622,592],{"class":401},[177,624,626,629],{"class":179,"line":625},10,[177,627,628],{"class":429},"  metadata",[177,630,631],{"class":224},": {\n",[177,633,635,638,640,643],{"class":179,"line":634},11,[177,636,637],{"class":429},"    key",[177,639,513],{"class":224},[177,641,642],{"class":187},"\"value\"",[177,644,519],{"class":224},[177,646,648],{"class":179,"line":647},12,[177,649,650],{"class":224},"  },\n",[177,652,654],{"class":179,"line":653},13,[177,655,656],{"class":224},"});\n",[335,658,660,710],{"className":659},[472],[169,661,663],{"className":381,"code":662,"language":383,"meta":167,"style":167},"curl -X POST https:\u002F\u002Fapi.rupt.com\u002Fv2\u002Fdevices\u002Fevaluate \\\n  -H \"Authorization: Bearer API_SECRET\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"action\": \"login\", \"user\": \"USER_ID\", \"fingerprint\": \"FINGERPRINT_HASH\", \"last_fingerprint\": \"LAST_FINGERPRINT_HASH\", \"version\": \"2.32.0\", \"ip\": \"IP_ADDRESS\", \"email\": \"EMAIL\", \"phone\": \"PHONE\", \"metadata\": {\"key\": \"value\"}}'\n",[91,664,665,683,693,702],{"__ignoreMap":167},[177,666,667,669,673,676,679],{"class":179,"line":180},[177,668,368],{"class":183},[177,670,672],{"class":671},"sRaZW"," -X",[177,674,675],{"class":187}," POST",[177,677,678],{"class":187}," https:\u002F\u002Fapi.rupt.com\u002Fv2\u002Fdevices\u002Fevaluate",[177,680,682],{"class":681},"sLJFi"," \\\n",[177,684,685,688,691],{"class":179,"line":398},[177,686,687],{"class":671},"  -H",[177,689,690],{"class":187}," \"Authorization: Bearer API_SECRET\"",[177,692,682],{"class":681},[177,694,695,697,700],{"class":179,"line":405},[177,696,687],{"class":671},[177,698,699],{"class":187}," \"Content-Type: application\u002Fjson\"",[177,701,682],{"class":681},[177,703,704,707],{"class":179,"line":534},[177,705,706],{"class":671},"  -d",[177,708,709],{"class":187}," '{\"action\": \"login\", \"user\": \"USER_ID\", \"fingerprint\": \"FINGERPRINT_HASH\", \"last_fingerprint\": \"LAST_FINGERPRINT_HASH\", \"version\": \"2.32.0\", \"ip\": \"IP_ADDRESS\", \"email\": \"EMAIL\", \"phone\": \"PHONE\", \"metadata\": {\"key\": \"value\"}}'\n",[249,711,713],{"type":712},"info",[61,714,715,716,720],{},"See ",[71,717,719],{"href":718},"\u002Fapi\u002Fevaluations\u002Fevaluate-an-action","evaluate an action"," for details about this endpoint.",[61,722,723,727,731],{},[177,724,726],{"className":725},[373],"4.",[177,728,730],{"className":729},[472],"2."," Rupt returns a response that looks like this:",[169,733,737],{"className":734,"code":735,"language":736,"meta":167,"style":167},"language-json shiki shiki-themes one-dark-pro monokai","{\n  \"verdict\": \"challenge\",\n  \"fingerprint_id\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n  \"reasons\": [\"new_device\", \"new_ip\"],\n  \"challenge_id\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n}\n","json",[91,738,739,744,758,770,789,799],{"__ignoreMap":167},[177,740,741],{"class":179,"line":180},[177,742,743],{"class":224},"{\n",[177,745,746,750,752,756],{"class":179,"line":398},[177,747,749],{"class":748},"s9wyi","  \"verdict\"",[177,751,513],{"class":224},[177,753,755],{"class":754},"sKGTp","\"challenge\"",[177,757,519],{"class":224},[177,759,760,763,765,768],{"class":179,"line":405},[177,761,762],{"class":748},"  \"fingerprint_id\"",[177,764,513],{"class":224},[177,766,767],{"class":754},"\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"",[177,769,519],{"class":224},[177,771,772,775,778,781,783,786],{"class":179,"line":534},[177,773,774],{"class":748},"  \"reasons\"",[177,776,777],{"class":224},": [",[177,779,780],{"class":754},"\"new_device\"",[177,782,298],{"class":224},[177,784,785],{"class":754},"\"new_ip\"",[177,787,788],{"class":224},"],\n",[177,790,791,794,796],{"class":179,"line":550},[177,792,793],{"class":748},"  \"challenge_id\"",[177,795,513],{"class":224},[177,797,798],{"class":754},"\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n",[177,800,801],{"class":179,"line":566},[177,802,803],{"class":224},"}\n",[61,805,806,807,298,810,298,813,298,816,819,820,138],{},"The verdict will be either ",[91,808,809],{},"challenge",[91,811,812],{},"allow",[91,814,815],{},"restrict",[91,817,818],{},"challenge_and_restrict",", or ",[91,821,822],{},"deny",[249,824,826],{"type":825},"warning",[61,827,828,829,833],{},"If you do not use Rupt for 2FA, skip to step ",[177,830,832],{"className":831},[373],"7.",[177,834,836],{"className":835},[472],"5.",[61,838,839,840,843,844,138],{},"The ",[91,841,842],{},"challenge_id"," can be used to perform a two-factor authentication challenge using the send challenge code method. For more information, see ",[71,845,847],{"href":846},"\u002Fapi\u002Fchallenges\u002Fsend-challenge-code","send a challenge code",[61,849,850,853,856,857,859,860,862,863,865],{},[177,851,836],{"className":852},[373],[177,854,468],{"className":855},[472],"\nIf the verdict is ",[91,858,809],{},", a ",[91,861,842],{}," is returned. Using the ",[91,864,842],{},", send the challenge code to the user and wait for the response:",[335,867,869],{"className":868},[373],[169,870,872],{"className":278,"code":871,"language":280,"meta":167,"style":167},"const { challenge_id } = await rupt.sendChallengeCode(challenge_id);\n",[91,873,874],{"__ignoreMap":167},[177,875,876,878,881,883,886,888,890,892,894,897,899,901],{"class":179,"line":180},[177,877,288],{"class":287},[177,879,880],{"class":224}," { ",[177,882,842],{"class":294},[177,884,885],{"class":224}," } ",[177,887,236],{"class":307},[177,889,311],{"class":310},[177,891,445],{"class":294},[177,893,138],{"class":224},[177,895,896],{"class":183},"sendChallengeCode",[177,898,456],{"class":224},[177,900,842],{"class":429},[177,902,462],{"class":224},[335,904,906],{"className":905},[472],[169,907,909],{"className":381,"code":908,"language":383,"meta":167,"style":167},"curl -X POST https:\u002F\u002Fapi.rupt.com\u002Fv2\u002Fchallenges\u002FCHALLENGE_ID\u002Fsend \\\n  -H \"Authorization: Bearer API_SECRET\" \\\n  -H \"Content-Type: application\u002Fjson\"\n",[91,910,911,924,932],{"__ignoreMap":167},[177,912,913,915,917,919,922],{"class":179,"line":180},[177,914,368],{"class":183},[177,916,672],{"class":671},[177,918,675],{"class":187},[177,920,921],{"class":187}," https:\u002F\u002Fapi.rupt.com\u002Fv2\u002Fchallenges\u002FCHALLENGE_ID\u002Fsend",[177,923,682],{"class":681},[177,925,926,928,930],{"class":179,"line":398},[177,927,687],{"class":671},[177,929,690],{"class":187},[177,931,682],{"class":681},[177,933,934,936],{"class":179,"line":405},[177,935,687],{"class":671},[177,937,938],{"class":187}," \"Content-Type: application\u002Fjson\"\n",[61,940,941,942,138],{},"This will send a challenge code to the user. For more information, see ",[71,943,847],{"href":846},[61,945,946,950,953],{},[177,947,949],{"className":948},[373],"6.",[177,951,726],{"className":952},[472]," With the user provided challenge code, verify the response:",[335,955,957],{"className":956},[373],[169,958,960],{"className":278,"code":959,"language":280,"meta":167,"style":167},"const { success } = await rupt.verifyChallengeCode(challenge_id, code);\n",[91,961,962],{"__ignoreMap":167},[177,963,964,966,968,971,973,975,977,979,981,984,986,988,990,992],{"class":179,"line":180},[177,965,288],{"class":287},[177,967,880],{"class":224},[177,969,970],{"class":294},"success",[177,972,885],{"class":224},[177,974,236],{"class":307},[177,976,311],{"class":310},[177,978,445],{"class":294},[177,980,138],{"class":224},[177,982,983],{"class":183},"verifyChallengeCode",[177,985,456],{"class":224},[177,987,842],{"class":429},[177,989,298],{"class":224},[177,991,91],{"class":429},[177,993,462],{"class":224},[335,995,997],{"className":996},[472],[169,998,1000],{"className":381,"code":999,"language":383,"meta":167,"style":167},"curl -X POST https:\u002F\u002Fapi.rupt.com\u002Fv2\u002Fchallenges\u002FCHALLENGE_ID\u002Fverify \\\n  -H \"Authorization: Bearer API_SECRET\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"code\": \"123456\"}'\n",[91,1001,1002,1015,1023,1031],{"__ignoreMap":167},[177,1003,1004,1006,1008,1010,1013],{"class":179,"line":180},[177,1005,368],{"class":183},[177,1007,672],{"class":671},[177,1009,675],{"class":187},[177,1011,1012],{"class":187}," https:\u002F\u002Fapi.rupt.com\u002Fv2\u002Fchallenges\u002FCHALLENGE_ID\u002Fverify",[177,1014,682],{"class":681},[177,1016,1017,1019,1021],{"class":179,"line":398},[177,1018,687],{"class":671},[177,1020,690],{"class":187},[177,1022,682],{"class":681},[177,1024,1025,1027,1029],{"class":179,"line":405},[177,1026,687],{"class":671},[177,1028,699],{"class":187},[177,1030,682],{"class":681},[177,1032,1033,1035],{"class":179,"line":534},[177,1034,706],{"class":671},[177,1036,1037],{"class":187}," '{\"code\": \"123456\"}'\n",[61,1039,1040,1041,138],{},"For more information, see ",[71,1042,1044],{"href":1043},"\u002Fapi\u002Fchallenges\u002Fverify-challenge-code","verify a challenge code",[61,1046,1047,1050,1053,1054,1057],{},[177,1048,832],{"className":1049},[373],[177,1051,836],{"className":1052},[472],"\nOnce you've allowed the user to login, let Rupt know that the user has successfully completed the challenge using the ",[91,1055,1056],{},"completeChallenge"," method or API endpoint. Rupt will know to trust the device and IP and will not trigger a challenge if the user attempts to login from the same device and IP in the future:",[335,1059,1061],{"className":1060},[373],[169,1062,1064],{"className":278,"code":1063,"language":280,"meta":167,"style":167},"const { success } = await rupt.completeChallenge(challenge_id);\n",[91,1065,1066],{"__ignoreMap":167},[177,1067,1068,1070,1072,1074,1076,1078,1080,1082,1084,1086,1088,1090],{"class":179,"line":180},[177,1069,288],{"class":287},[177,1071,880],{"class":224},[177,1073,970],{"class":294},[177,1075,885],{"class":224},[177,1077,236],{"class":307},[177,1079,311],{"class":310},[177,1081,445],{"class":294},[177,1083,138],{"class":224},[177,1085,1056],{"class":183},[177,1087,456],{"class":224},[177,1089,842],{"class":429},[177,1091,462],{"class":224},[335,1093,1095],{"className":1094},[472],[169,1096,1098],{"className":381,"code":1097,"language":383,"meta":167,"style":167},"curl -X POST https:\u002F\u002Fapi.rupt.com\u002Fv2\u002Fchallenges\u002FCHALLENGE_ID\u002Fcomplete \\\n  -H \"Authorization: Bearer API_SECRET\" \\\n  -H \"Content-Type: application\u002Fjson\"\n",[91,1099,1100,1113,1121],{"__ignoreMap":167},[177,1101,1102,1104,1106,1108,1111],{"class":179,"line":180},[177,1103,368],{"class":183},[177,1105,672],{"class":671},[177,1107,675],{"class":187},[177,1109,1110],{"class":187}," https:\u002F\u002Fapi.rupt.com\u002Fv2\u002Fchallenges\u002FCHALLENGE_ID\u002Fcomplete",[177,1112,682],{"class":681},[177,1114,1115,1117,1119],{"class":179,"line":398},[177,1116,687],{"class":671},[177,1118,690],{"class":187},[177,1120,682],{"class":681},[177,1122,1123,1125],{"class":179,"line":405},[177,1124,687],{"class":671},[177,1126,938],{"class":187},[61,1128,1040,1129,138],{},[71,1130,1132],{"href":1131},"\u002Fapi\u002Fchallenges\u002Fcomplete-challenge","complete a challenge",[1134,1135,1136],"style",{},"html pre.shiki code .sUpKv, html code.shiki .sUpKv{--shiki-default:#61AFEF;--shiki-dark:#A6E22E}html pre.shiki code .sgpKs, html code.shiki .sgpKs{--shiki-default:#98C379;--shiki-dark:#E6DB74}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sFXR2, html code.shiki .sFXR2{--shiki-default:#ABB2BF;--shiki-dark:#F8F8F2}html pre.shiki code .s2zKK, html code.shiki .s2zKK{--shiki-default:#E06C75;--shiki-dark:#F92672}html pre.shiki code .spIlZ, html code.shiki .spIlZ{--shiki-default:#D19A66;--shiki-dark:#A6E22E}html pre.shiki code .sfrnW, html code.shiki .sfrnW{--shiki-default:#C678DD;--shiki-default-font-style:inherit;--shiki-dark:#66D9EF;--shiki-dark-font-style:italic}html pre.shiki code .syDQ0, html code.shiki .syDQ0{--shiki-default:#E5C07B;--shiki-dark:#F8F8F2}html pre.shiki code .sBBc0, html code.shiki .sBBc0{--shiki-default:#56B6C2;--shiki-dark:#F92672}html pre.shiki code .sqnWQ, html code.shiki .sqnWQ{--shiki-default:#C678DD;--shiki-dark:#F92672}html pre.shiki code .sDDnO, html code.shiki .sDDnO{--shiki-default:#7F848E;--shiki-default-font-style:italic;--shiki-dark:#88846F;--shiki-dark-font-style:inherit}html pre.shiki code .sskXI, html code.shiki .sskXI{--shiki-default:#E06C75;--shiki-dark:#F8F8F2}html pre.shiki code .sRaZW, html code.shiki .sRaZW{--shiki-default:#D19A66;--shiki-dark:#AE81FF}html pre.shiki code .sLJFi, html code.shiki .sLJFi{--shiki-default:#56B6C2;--shiki-dark:#AE81FF}html pre.shiki code .s9wyi, html code.shiki .s9wyi{--shiki-default:#E06C75;--shiki-default-font-style:inherit;--shiki-dark:#66D9EF;--shiki-dark-font-style:italic}html pre.shiki code .sKGTp, html code.shiki .sKGTp{--shiki-default:#98C379;--shiki-dark:#CFCFC2}",{"title":167,"searchDepth":398,"depth":398,"links":1138},[1139,1140,1141],{"id":58,"depth":398,"text":59},{"id":107,"depth":398,"text":108},{"id":118,"depth":398,"text":119,"children":1142},[1143,1144,1145],{"id":123,"depth":405,"text":124},{"id":154,"depth":405,"text":155},{"id":332,"depth":405,"text":333},"md",{},true,{"title":42,"description":167},{"loc":43},"YhpzHwTjCU5JqH_jqx8F4ruVEzhZrdcZcFp7avsVeLY",1776564889101]