[{"data":1,"prerenderedAt":2619},["ShallowReactive",2],{"docs-nav-\u002Fdocs\u002Faccount-sharing\u002Fquick-start\u002F":3,"\u002Fdocs\u002Faccount-sharing\u002Fquick-start\u002F":92},[4],{"title":5,"path":6,"stem":7,"children":8,"page":46},"Account Sharing","\u002Fdocs\u002Faccount-sharing","1.docs\u002F2.account sharing",[9,13,17,21,47,72],{"title":10,"path":11,"stem":12},"How it works","\u002Fdocs\u002Faccount-sharing\u002Fhow-account-sharing-prevention-works","1.docs\u002F2.account sharing\u002F0.How account sharing prevention works",{"title":14,"path":15,"stem":16},"Quick start","\u002Fdocs\u002Faccount-sharing\u002Fquick-start","1.docs\u002F2.account sharing\u002F1.Quick start",{"title":18,"path":19,"stem":20},"Events & actions","\u002Fdocs\u002Faccount-sharing\u002Flisten-to-events","1.docs\u002F2.account sharing\u002F2.Listen to events",{"title":22,"path":23,"stem":24,"children":25,"page":46},"Concepts","\u002Fdocs\u002Faccount-sharing\u002Fconcepts","1.docs\u002F2.account sharing\u002F4.Concepts",[26,30,34,38,42],{"title":27,"path":28,"stem":29},"Challenges","\u002Fdocs\u002Faccount-sharing\u002Fconcepts\u002Fchallenges","1.docs\u002F2.account sharing\u002F4.Concepts\u002F0.challenges",{"title":31,"path":32,"stem":33},"Device limits","\u002Fdocs\u002Faccount-sharing\u002Fconcepts\u002Fconfigure-device-limits","1.docs\u002F2.account sharing\u002F4.Concepts\u002F1.configure-device-limits",{"title":35,"path":36,"stem":37},"Groups","\u002Fdocs\u002Faccount-sharing\u002Fconcepts\u002Fgroups","1.docs\u002F2.account sharing\u002F4.Concepts\u002F2.groups",{"title":39,"path":40,"stem":41},"Automatically detach devices","\u002Fdocs\u002Faccount-sharing\u002Fconcepts\u002Fautomatically-detaching-devices","1.docs\u002F2.account sharing\u002F4.Concepts\u002F3.automatically-detaching-devices",{"title":43,"path":44,"stem":45},"Excluded Devices","\u002Fdocs\u002Faccount-sharing\u002Fconcepts\u002Fexcluded-devices","1.docs\u002F2.account sharing\u002F4.Concepts\u002F4.excluded-devices",false,{"title":48,"path":49,"stem":50,"children":51,"page":46},"Advanced","\u002Fdocs\u002Faccount-sharing\u002Fadvanced","1.docs\u002F2.account sharing\u002F8.Advanced",[52,56,60,64,68],{"title":53,"path":54,"stem":55},"Signing the user out","\u002Fdocs\u002Faccount-sharing\u002Fadvanced\u002Fsigning-the-user-out","1.docs\u002F2.account sharing\u002F8.Advanced\u002F1.Signing the user out",{"title":57,"path":58,"stem":59},"Webhooks","\u002Fdocs\u002Faccount-sharing\u002Fadvanced\u002Fwebhooks","1.docs\u002F2.account sharing\u002F8.Advanced\u002F2.webhooks",{"title":61,"path":62,"stem":63},"Metadata","\u002Fdocs\u002Faccount-sharing\u002Fadvanced\u002Fusing-metadata","1.docs\u002F2.account sharing\u002F8.Advanced\u002F3.Using metadata",{"title":65,"path":66,"stem":67},"When to attach","\u002Fdocs\u002Faccount-sharing\u002Fadvanced\u002Fwhen-to-call-the-attach-function","1.docs\u002F2.account sharing\u002F8.Advanced\u002F5.When to call the attach function",{"title":69,"path":70,"stem":71},"Tracking conversions","\u002Fdocs\u002Faccount-sharing\u002Fadvanced\u002Ftracking-conversions","1.docs\u002F2.account sharing\u002F8.Advanced\u002F8.Tracking conversions",{"title":73,"path":74,"stem":75,"children":76,"page":46},"Signals","\u002Fdocs\u002Faccount-sharing\u002Fsignals","1.docs\u002F2.account sharing\u002F9.Signals",[77,81,85,89],{"title":78,"path":79,"stem":80},"High velocity","\u002Fdocs\u002Faccount-sharing\u002Fsignals\u002Fhigh-velocity","1.docs\u002F2.account sharing\u002F9.Signals\u002F1.High velocity",{"title":82,"path":83,"stem":84},"Impossible travel","\u002Fdocs\u002Faccount-sharing\u002Fsignals\u002Fimpossible-travel","1.docs\u002F2.account sharing\u002F9.Signals\u002F2.Impossible travel",{"title":86,"path":87,"stem":88},"Concurrency","\u002Fdocs\u002Faccount-sharing\u002Fsignals\u002Fconcurrency","1.docs\u002F2.account sharing\u002F9.Signals\u002F3.Concurrency",{"title":31,"path":90,"stem":91},"\u002Fdocs\u002Faccount-sharing\u002Fsignals\u002Fdevice-limits","1.docs\u002F2.account sharing\u002F9.Signals\u002F4.Device limits",{"id":93,"title":14,"body":94,"description":2611,"extension":2612,"meta":2613,"navigation":1008,"path":15,"seo":2616,"sitemap":2617,"stem":16,"__hash__":2618},"docs\u002F1.docs\u002F2.account sharing\u002F1.Quick start.md",{"type":95,"value":96,"toc":2605},"minimark",[97,100,105,109,114,697,701,704,710,719,2581,2596,2601],[98,99],"platform-selector",{},[101,102,104],"h1",{"id":103},"detect-prevent-account-sharing","Detect & prevent account sharing",[106,107,108],"p",{},"This quick start guide will walk you through the steps to integrate Rupt into your app or website using JavaScript.",[110,111,113],"h2",{"id":112},"_1-installation","1. Installation",[115,116,117,261,293,325,357,389,426,662],"platform-content",{},[118,119,121,126,246],"template",{"v-slot:web-html":120},"",[122,123,125],"h4",{"id":124},"using-a-package-manager","Using a package manager",[127,128,129,156,173],"code-tabs",{},[118,130,131],{"v-slot:yarn":120},[132,133,137],"pre",{"className":134,"code":135,"language":136,"meta":120,"style":120},"language-sh shiki shiki-themes one-dark-pro monokai","yarn add rupt\n","sh",[138,139,140],"code",{"__ignoreMap":120},[141,142,145,149,153],"span",{"class":143,"line":144},"line",1,[141,146,148],{"class":147},"sUpKv","yarn",[141,150,152],{"class":151},"sgpKs"," add",[141,154,155],{"class":151}," rupt\n",[118,157,158],{"v-slot:npm":120},[132,159,161],{"className":134,"code":160,"language":136,"meta":120,"style":120},"npm install rupt\n",[138,162,163],{"__ignoreMap":120},[141,164,165,168,171],{"class":143,"line":144},[141,166,167],{"class":147},"npm",[141,169,170],{"class":151}," install",[141,172,155],{"class":151},[118,174,175],{"v-slot:html":120},[132,176,180],{"className":177,"code":178,"language":179,"meta":120,"style":120},"language-html shiki shiki-themes one-dark-pro monokai","\u003CScript src=\"https:\u002F\u002Fcdn.rupt.dev\u002Fjs\u002Frupt.js\" onLoad={async () => { const\nRupt = window.Rupt; \u002F\u002F Use Rupt here }} \u002F>\n","html",[138,181,182,220],{"__ignoreMap":120},[141,183,184,188,192,196,199,202,205,207,210,213,216],{"class":143,"line":144},[141,185,187],{"class":186},"sFXR2","\u003C",[141,189,191],{"class":190},"s2zKK","Script",[141,193,195],{"class":194},"spIlZ"," src",[141,197,198],{"class":186},"=",[141,200,201],{"class":151},"\"https:\u002F\u002Fcdn.rupt.dev\u002Fjs\u002Frupt.js\"",[141,203,204],{"class":194}," onLoad",[141,206,198],{"class":186},[141,208,209],{"class":151},"{async",[141,211,212],{"class":194}," ()",[141,214,215],{"class":186}," => { ",[141,217,219],{"class":218},"sskXI","const\n",[141,221,223,226,230,234,237,239,242],{"class":143,"line":222},2,[141,224,225],{"class":218},"Rupt",[141,227,229],{"class":228},"sBBc0"," =",[141,231,233],{"class":232},"syDQ0"," window",[141,235,236],{"class":186},".",[141,238,225],{"class":218},[141,240,241],{"class":186},"; ",[141,243,245],{"class":244},"sDDnO","\u002F\u002F Use Rupt here }} \u002F>\n",[247,248,250],"alert",{"type":249},"tip",[106,251,252,253,256,257,260],{},"When using HTML script tags, be sure to wait for the script to be loaded. Rupt will be injected into the ",[138,254,255],{},"window"," so you can use ",[138,258,259],{},"window.Rupt"," instead of Rupt.",[118,262,263],{"v-slot:web-nuxt":120},[127,264,265,279],{},[118,266,267],{"v-slot:yarn":120},[132,268,269],{"className":134,"code":135,"language":136,"meta":120,"style":120},[138,270,271],{"__ignoreMap":120},[141,272,273,275,277],{"class":143,"line":144},[141,274,148],{"class":147},[141,276,152],{"class":151},[141,278,155],{"class":151},[118,280,281],{"v-slot:npm":120},[132,282,283],{"className":134,"code":160,"language":136,"meta":120,"style":120},[138,284,285],{"__ignoreMap":120},[141,286,287,289,291],{"class":143,"line":144},[141,288,167],{"class":147},[141,290,170],{"class":151},[141,292,155],{"class":151},[118,294,295],{"v-slot:web-react":120},[127,296,297,311],{},[118,298,299],{"v-slot:yarn":120},[132,300,301],{"className":134,"code":135,"language":136,"meta":120,"style":120},[138,302,303],{"__ignoreMap":120},[141,304,305,307,309],{"class":143,"line":144},[141,306,148],{"class":147},[141,308,152],{"class":151},[141,310,155],{"class":151},[118,312,313],{"v-slot:npm":120},[132,314,315],{"className":134,"code":160,"language":136,"meta":120,"style":120},[138,316,317],{"__ignoreMap":120},[141,318,319,321,323],{"class":143,"line":144},[141,320,167],{"class":147},[141,322,170],{"class":151},[141,324,155],{"class":151},[118,326,327],{"v-slot:web-nextjs":120},[127,328,329,343],{},[118,330,331],{"v-slot:yarn":120},[132,332,333],{"className":134,"code":135,"language":136,"meta":120,"style":120},[138,334,335],{"__ignoreMap":120},[141,336,337,339,341],{"class":143,"line":144},[141,338,148],{"class":147},[141,340,152],{"class":151},[141,342,155],{"class":151},[118,344,345],{"v-slot:npm":120},[132,346,347],{"className":134,"code":160,"language":136,"meta":120,"style":120},[138,348,349],{"__ignoreMap":120},[141,350,351,353,355],{"class":143,"line":144},[141,352,167],{"class":147},[141,354,170],{"class":151},[141,356,155],{"class":151},[118,358,359],{"v-slot:web-vue":120},[127,360,361,375],{},[118,362,363],{"v-slot:yarn":120},[132,364,365],{"className":134,"code":135,"language":136,"meta":120,"style":120},[138,366,367],{"__ignoreMap":120},[141,368,369,371,373],{"class":143,"line":144},[141,370,148],{"class":147},[141,372,152],{"class":151},[141,374,155],{"class":151},[118,376,377],{"v-slot:npm":120},[132,378,379],{"className":134,"code":160,"language":136,"meta":120,"style":120},[138,380,381],{"__ignoreMap":120},[141,382,383,385,387],{"class":143,"line":144},[141,384,167],{"class":147},[141,386,170],{"class":151},[141,388,155],{"class":151},[118,390,391],{"v-slot:ios-swift":120},[392,393,394,404,416],"ol",{},[395,396,397,398],"li",{},"Download the Rupt SDK binary from ",[399,400,403],"a",{"href":401,"target":402},"\u002Fios\u002Fsdk\u002FRuptClient.xcframework.zip","_blank","this link",[395,405,406,407,410,411],{},"Unzip & drag and drop the ",[138,408,409],{},"RuptClient.xcframework"," into your project.\n",[412,413],"img",{"alt":414,"src":415},"iOS package installation image","\u002Fimg\u002Frupt-package-install.png",[395,417,418,419,422,423,236],{},"Select ",[138,420,421],{},"Copy items if needed"," and click ",[138,424,425],{},"Finish",[118,427,428,543],{"v-slot:android-kotlin":120},[395,429,430,431,434,435,438,439,442,443,446,447],{},"Ensure ",[138,432,433],{},"mavenCentral()"," and ",[138,436,437],{},"jitpack"," are added to your ",[138,440,441],{},"dependencyResolutionManagement"," block in your ",[138,444,445],{},"settings.gradle"," file. If it is not, add it like so:\n",[132,448,452],{"className":449,"code":450,"language":451,"meta":120,"style":120},"language-kotlin shiki shiki-themes one-dark-pro monokai","dependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven {\n            url = URI(\"https:\u002F\u002Fjitpack.io\")\n        }\n    }\n}\n","kotlin",[138,453,454,461,472,480,489,497,505,525,531,537],{"__ignoreMap":120},[141,455,456,458],{"class":143,"line":144},[141,457,441],{"class":147},[141,459,460],{"class":186}," {\n",[141,462,463,466,469],{"class":143,"line":222},[141,464,465],{"class":186},"    repositoriesMode.",[141,467,468],{"class":147},"set",[141,470,471],{"class":186},"(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n",[141,473,475,478],{"class":143,"line":474},3,[141,476,477],{"class":147},"    repositories",[141,479,460],{"class":186},[141,481,483,486],{"class":143,"line":482},4,[141,484,485],{"class":147},"        google",[141,487,488],{"class":186},"()\n",[141,490,492,495],{"class":143,"line":491},5,[141,493,494],{"class":147},"        mavenCentral",[141,496,488],{"class":186},[141,498,500,503],{"class":143,"line":499},6,[141,501,502],{"class":147},"        maven",[141,504,460],{"class":186},[141,506,508,511,513,516,519,522],{"class":143,"line":507},7,[141,509,510],{"class":186},"            url ",[141,512,198],{"class":228},[141,514,515],{"class":147}," URI",[141,517,518],{"class":186},"(",[141,520,521],{"class":151},"\"https:\u002F\u002Fjitpack.io\"",[141,523,524],{"class":186},")\n",[141,526,528],{"class":143,"line":527},8,[141,529,530],{"class":186},"        }\n",[141,532,534],{"class":143,"line":533},9,[141,535,536],{"class":186},"    }\n",[141,538,540],{"class":143,"line":539},10,[141,541,542],{"class":186},"}\n",[395,544,545,546],{},"Add Rupt to your dependencies along with the required dependencies\n",[132,547,549],{"className":449,"code":548,"language":451,"meta":120,"style":120}," implementation(\"dev.rupt.android:rupt-android:3.7.0\")\n implementation(\"io.ktor:ktor-client-core:2.0.3\")\n implementation(\"io.ktor:ktor-client-cio:2.0.3\")\n implementation(\"io.ktor:ktor-client-content-negotiation:2.0.3\")\n implementation(\"io.ktor:ktor-serialization-kotlinx-json:2.0.3\")\n implementation(\"org.jetbrains.kotlinx:kotlinx-datetime:0.4.0\")\n implementation(\"com.github.leandroborgesferreira:loading-button-android:2.3.0\")\n implementation(\"com.squareup.okhttp3:okhttp:4.12.0\")\n implementation(\"com.squareup.okhttp3:okhttp-sse:4.12.0\")\n implementation(\"com.google.android.material:material:1.12.0\")\n",[138,550,551,563,574,585,596,607,618,629,640,651],{"__ignoreMap":120},[141,552,553,556,558,561],{"class":143,"line":144},[141,554,555],{"class":147}," implementation",[141,557,518],{"class":186},[141,559,560],{"class":151},"\"dev.rupt.android:rupt-android:3.7.0\"",[141,562,524],{"class":186},[141,564,565,567,569,572],{"class":143,"line":222},[141,566,555],{"class":147},[141,568,518],{"class":186},[141,570,571],{"class":151},"\"io.ktor:ktor-client-core:2.0.3\"",[141,573,524],{"class":186},[141,575,576,578,580,583],{"class":143,"line":474},[141,577,555],{"class":147},[141,579,518],{"class":186},[141,581,582],{"class":151},"\"io.ktor:ktor-client-cio:2.0.3\"",[141,584,524],{"class":186},[141,586,587,589,591,594],{"class":143,"line":482},[141,588,555],{"class":147},[141,590,518],{"class":186},[141,592,593],{"class":151},"\"io.ktor:ktor-client-content-negotiation:2.0.3\"",[141,595,524],{"class":186},[141,597,598,600,602,605],{"class":143,"line":491},[141,599,555],{"class":147},[141,601,518],{"class":186},[141,603,604],{"class":151},"\"io.ktor:ktor-serialization-kotlinx-json:2.0.3\"",[141,606,524],{"class":186},[141,608,609,611,613,616],{"class":143,"line":499},[141,610,555],{"class":147},[141,612,518],{"class":186},[141,614,615],{"class":151},"\"org.jetbrains.kotlinx:kotlinx-datetime:0.4.0\"",[141,617,524],{"class":186},[141,619,620,622,624,627],{"class":143,"line":507},[141,621,555],{"class":147},[141,623,518],{"class":186},[141,625,626],{"class":151},"\"com.github.leandroborgesferreira:loading-button-android:2.3.0\"",[141,628,524],{"class":186},[141,630,631,633,635,638],{"class":143,"line":527},[141,632,555],{"class":147},[141,634,518],{"class":186},[141,636,637],{"class":151},"\"com.squareup.okhttp3:okhttp:4.12.0\"",[141,639,524],{"class":186},[141,641,642,644,646,649],{"class":143,"line":533},[141,643,555],{"class":147},[141,645,518],{"class":186},[141,647,648],{"class":151},"\"com.squareup.okhttp3:okhttp-sse:4.12.0\"",[141,650,524],{"class":186},[141,652,653,655,657,660],{"class":143,"line":539},[141,654,555],{"class":147},[141,656,518],{"class":186},[141,658,659],{"class":151},"\"com.google.android.material:material:1.12.0\"",[141,661,524],{"class":186},[118,663,664],{"v-slot:react native-react":120},[127,665,666,682],{},[118,667,668],{"v-slot:yarn":120},[132,669,671],{"className":134,"code":670,"language":136,"meta":120,"style":120},"yarn add @ruptjs\u002Frupt-react-native\n",[138,672,673],{"__ignoreMap":120},[141,674,675,677,679],{"class":143,"line":144},[141,676,148],{"class":147},[141,678,152],{"class":151},[141,680,681],{"class":151}," @ruptjs\u002Frupt-react-native\n",[118,683,684],{"v-slot:npm":120},[132,685,687],{"className":134,"code":686,"language":136,"meta":120,"style":120},"npm install @ruptjs\u002Frupt-react-native\n",[138,688,689],{"__ignoreMap":120},[141,690,691,693,695],{"class":143,"line":144},[141,692,167],{"class":147},[141,694,170],{"class":151},[141,696,681],{"class":151},[110,698,700],{"id":699},"_2-usage","2. Usage",[106,702,703],{},"The main task you need to do is to attach devices to accounts. Ideally, attach on all web pages and on mobile app launch.",[106,705,706,707],{},"By doing this, Rupt associates devices to accounts and detect behaviors that indicate account sharing. For more on this, see: ",[399,708,709],{"href":11},"How account sharing prevention works?",[711,712,714],"h3",{"id":713},"attach-a-device",[141,715,718],{"className":716},[717],"font-bold","Attach a device",[115,720,721,952,1141,1309,1429,1561,2080,2356],{},[118,722,723,726,751,765,943],{"v-slot:web-html":120},[106,724,725],{},"First import the script (only if you installed using a package manager)",[132,727,731],{"className":728,"code":729,"language":730,"meta":120,"style":120},"language-js shiki shiki-themes one-dark-pro monokai","import Rupt from \"rupt\";\n","js",[138,732,733],{"__ignoreMap":120},[141,734,735,739,742,745,748],{"class":143,"line":144},[141,736,738],{"class":737},"sqnWQ","import",[141,740,741],{"class":218}," Rupt",[141,743,744],{"class":737}," from",[141,746,747],{"class":151}," \"rupt\"",[141,749,750],{"class":186},";\n",[106,752,753,754,757,758,761,762,236],{},"Call the ",[138,755,756],{},"attach"," function to link the device to the account. You must pass the ",[138,759,760],{},"client_id"," and a ",[138,763,764],{},"account",[132,766,768],{"className":728,"code":767,"language":730,"meta":120,"style":120},"await Rupt.attach({\n  client_id: \"client_id\",\n  account: \"account_id\",\n  email: \"user_email\", \u002F\u002F Optional\n  phone: \"user_phone\", \u002F\u002F Optional\n  redirect_urls: {\n    logout_url: \"https:\u002F\u002Fyour-logout-url.com\",\n    new_account_url: \"https:\u002F\u002Fyour-create-new-account-url.com\",\n  },\n  groups: [\n    \u002F\u002F an array of groups or a single group object\n    {\n      id: \"group_id\",\n      name: \"group name\", \u002F\u002F Optional\n    },\n  ],\n});\n",[138,769,770,784,798,810,826,840,848,860,872,877,885,891,897,910,925,931,937],{"__ignoreMap":120},[141,771,772,775,777,779,781],{"class":143,"line":144},[141,773,774],{"class":737},"await",[141,776,741],{"class":232},[141,778,236],{"class":186},[141,780,756],{"class":147},[141,782,783],{"class":186},"({\n",[141,785,786,789,792,795],{"class":143,"line":222},[141,787,788],{"class":218},"  client_id",[141,790,791],{"class":186},": ",[141,793,794],{"class":151},"\"client_id\"",[141,796,797],{"class":186},",\n",[141,799,800,803,805,808],{"class":143,"line":474},[141,801,802],{"class":218},"  account",[141,804,791],{"class":186},[141,806,807],{"class":151},"\"account_id\"",[141,809,797],{"class":186},[141,811,812,815,817,820,823],{"class":143,"line":482},[141,813,814],{"class":218},"  email",[141,816,791],{"class":186},[141,818,819],{"class":151},"\"user_email\"",[141,821,822],{"class":186},", ",[141,824,825],{"class":244},"\u002F\u002F Optional\n",[141,827,828,831,833,836,838],{"class":143,"line":491},[141,829,830],{"class":218},"  phone",[141,832,791],{"class":186},[141,834,835],{"class":151},"\"user_phone\"",[141,837,822],{"class":186},[141,839,825],{"class":244},[141,841,842,845],{"class":143,"line":499},[141,843,844],{"class":218},"  redirect_urls",[141,846,847],{"class":186},": {\n",[141,849,850,853,855,858],{"class":143,"line":507},[141,851,852],{"class":218},"    logout_url",[141,854,791],{"class":186},[141,856,857],{"class":151},"\"https:\u002F\u002Fyour-logout-url.com\"",[141,859,797],{"class":186},[141,861,862,865,867,870],{"class":143,"line":527},[141,863,864],{"class":218},"    new_account_url",[141,866,791],{"class":186},[141,868,869],{"class":151},"\"https:\u002F\u002Fyour-create-new-account-url.com\"",[141,871,797],{"class":186},[141,873,874],{"class":143,"line":533},[141,875,876],{"class":186},"  },\n",[141,878,879,882],{"class":143,"line":539},[141,880,881],{"class":218},"  groups",[141,883,884],{"class":186},": [\n",[141,886,888],{"class":143,"line":887},11,[141,889,890],{"class":244},"    \u002F\u002F an array of groups or a single group object\n",[141,892,894],{"class":143,"line":893},12,[141,895,896],{"class":186},"    {\n",[141,898,900,903,905,908],{"class":143,"line":899},13,[141,901,902],{"class":218},"      id",[141,904,791],{"class":186},[141,906,907],{"class":151},"\"group_id\"",[141,909,797],{"class":186},[141,911,913,916,918,921,923],{"class":143,"line":912},14,[141,914,915],{"class":218},"      name",[141,917,791],{"class":186},[141,919,920],{"class":151},"\"group name\"",[141,922,822],{"class":186},[141,924,825],{"class":244},[141,926,928],{"class":143,"line":927},15,[141,929,930],{"class":186},"    },\n",[141,932,934],{"class":143,"line":933},16,[141,935,936],{"class":186},"  ],\n",[141,938,940],{"class":143,"line":939},17,[141,941,942],{"class":186},"});\n",[106,944,945,946,948,949],{},"You should call the ",[138,947,756],{}," function on every page as soon as you have the account id available. For more on this refer to the advanced section: ",[399,950,951],{"href":66},"When and where to call the attach function?",[118,953,954,970],{"v-slot:web-nuxt":120},[106,955,753,956,958,959,962,963,965,966,236],{},[138,957,756],{}," function to link the device to the account. This should be done once on every page as soon as you have the account id available. For example, in the ",[138,960,961],{},"app.vue"," file, you can do this in the setup script block. For more information regarding the ",[138,964,961],{}," file, please refer to the ",[399,967,969],{"href":968,"target":402},"https:\u002F\u002Fnuxt.com\u002Fdocs\u002Fguide\u002Fdirectory-structure\u002Fapp","Nuxt documentation",[132,971,973],{"className":728,"code":972,"language":730,"meta":120,"style":120},"import Rupt from \"rupt\";\nconst route = useRoute();\n\nwatch(route.path, async () => {\n  await Rupt.attach({\n    client_id: \"client_id\",\n    account: \"account_id\",\n    email: \"user_email\", \u002F\u002F Optional\n    phone: \"user_phone\", \u002F\u002F Optional\n    redirect_urls: {\n      logout_url: \"https:\u002F\u002Fyour-logout-url.com\",\n      new_account_url: \"https:\u002F\u002Fyour-create-new-account-url.com\",\n    },\n  })\n});\n",[138,974,975,987,1004,1010,1038,1051,1062,1073,1086,1099,1106,1117,1128,1132,1137],{"__ignoreMap":120},[141,976,977,979,981,983,985],{"class":143,"line":144},[141,978,738],{"class":737},[141,980,741],{"class":218},[141,982,744],{"class":737},[141,984,747],{"class":151},[141,986,750],{"class":186},[141,988,989,993,996,998,1001],{"class":143,"line":222},[141,990,992],{"class":991},"sfrnW","const",[141,994,995],{"class":232}," route",[141,997,229],{"class":228},[141,999,1000],{"class":147}," useRoute",[141,1002,1003],{"class":186},"();\n",[141,1005,1006],{"class":143,"line":474},[141,1007,1009],{"emptyLinePlaceholder":1008},true,"\n",[141,1011,1012,1015,1017,1020,1022,1025,1027,1030,1033,1036],{"class":143,"line":482},[141,1013,1014],{"class":147},"watch",[141,1016,518],{"class":186},[141,1018,1019],{"class":232},"route",[141,1021,236],{"class":186},[141,1023,1024],{"class":218},"path",[141,1026,822],{"class":186},[141,1028,1029],{"class":737},"async",[141,1031,1032],{"class":186}," () ",[141,1034,1035],{"class":991},"=>",[141,1037,460],{"class":186},[141,1039,1040,1043,1045,1047,1049],{"class":143,"line":491},[141,1041,1042],{"class":737},"  await",[141,1044,741],{"class":232},[141,1046,236],{"class":186},[141,1048,756],{"class":147},[141,1050,783],{"class":186},[141,1052,1053,1056,1058,1060],{"class":143,"line":499},[141,1054,1055],{"class":218},"    client_id",[141,1057,791],{"class":186},[141,1059,794],{"class":151},[141,1061,797],{"class":186},[141,1063,1064,1067,1069,1071],{"class":143,"line":507},[141,1065,1066],{"class":218},"    account",[141,1068,791],{"class":186},[141,1070,807],{"class":151},[141,1072,797],{"class":186},[141,1074,1075,1078,1080,1082,1084],{"class":143,"line":527},[141,1076,1077],{"class":218},"    email",[141,1079,791],{"class":186},[141,1081,819],{"class":151},[141,1083,822],{"class":186},[141,1085,825],{"class":244},[141,1087,1088,1091,1093,1095,1097],{"class":143,"line":533},[141,1089,1090],{"class":218},"    phone",[141,1092,791],{"class":186},[141,1094,835],{"class":151},[141,1096,822],{"class":186},[141,1098,825],{"class":244},[141,1100,1101,1104],{"class":143,"line":539},[141,1102,1103],{"class":218},"    redirect_urls",[141,1105,847],{"class":186},[141,1107,1108,1111,1113,1115],{"class":143,"line":887},[141,1109,1110],{"class":218},"      logout_url",[141,1112,791],{"class":186},[141,1114,857],{"class":151},[141,1116,797],{"class":186},[141,1118,1119,1122,1124,1126],{"class":143,"line":893},[141,1120,1121],{"class":218},"      new_account_url",[141,1123,791],{"class":186},[141,1125,869],{"class":151},[141,1127,797],{"class":186},[141,1129,1130],{"class":143,"line":899},[141,1131,930],{"class":186},[141,1133,1134],{"class":143,"line":912},[141,1135,1136],{"class":186},"  })\n",[141,1138,1139],{"class":143,"line":927},[141,1140,942],{"class":186},[118,1142,1143,1152],{"v-slot:web-nextjs":120},[106,1144,753,1145,1147,1148,1151],{},[138,1146,756],{}," function on every page as soon as you have the account id available. In the NextJS ",[138,1149,1150],{},"_app.tsx"," file, you can do this by listening to the router changes. This will ensure that the device is attached to the account on every page.",[132,1153,1155],{"className":728,"code":1154,"language":730,"meta":120,"style":120},"import Rupt from \"rupt\";\nconst router = useRouter();\n\nuseEffect(async () => {\n  await Rupt.attach({\n    client_id: \"client_id\",\n    account: \"account_id\",\n    email: \"user_email\", \u002F\u002F Optional\n    phone: \"user_phone\", \u002F\u002F Optional\n    redirect_urls: {\n      logout_url: \"https:\u002F\u002Fyour-logout-url.com\",\n      new_account_url: \"https:\u002F\u002Fyour-create-new-account-url.com\",\n    },\n  });\n}, [router.asPath]);\n",[138,1156,1157,1169,1183,1187,1202,1214,1224,1234,1246,1258,1264,1274,1284,1288,1293],{"__ignoreMap":120},[141,1158,1159,1161,1163,1165,1167],{"class":143,"line":144},[141,1160,738],{"class":737},[141,1162,741],{"class":218},[141,1164,744],{"class":737},[141,1166,747],{"class":151},[141,1168,750],{"class":186},[141,1170,1171,1173,1176,1178,1181],{"class":143,"line":222},[141,1172,992],{"class":991},[141,1174,1175],{"class":232}," router",[141,1177,229],{"class":228},[141,1179,1180],{"class":147}," useRouter",[141,1182,1003],{"class":186},[141,1184,1185],{"class":143,"line":474},[141,1186,1009],{"emptyLinePlaceholder":1008},[141,1188,1189,1192,1194,1196,1198,1200],{"class":143,"line":482},[141,1190,1191],{"class":147},"useEffect",[141,1193,518],{"class":186},[141,1195,1029],{"class":737},[141,1197,1032],{"class":186},[141,1199,1035],{"class":991},[141,1201,460],{"class":186},[141,1203,1204,1206,1208,1210,1212],{"class":143,"line":491},[141,1205,1042],{"class":737},[141,1207,741],{"class":232},[141,1209,236],{"class":186},[141,1211,756],{"class":147},[141,1213,783],{"class":186},[141,1215,1216,1218,1220,1222],{"class":143,"line":499},[141,1217,1055],{"class":218},[141,1219,791],{"class":186},[141,1221,794],{"class":151},[141,1223,797],{"class":186},[141,1225,1226,1228,1230,1232],{"class":143,"line":507},[141,1227,1066],{"class":218},[141,1229,791],{"class":186},[141,1231,807],{"class":151},[141,1233,797],{"class":186},[141,1235,1236,1238,1240,1242,1244],{"class":143,"line":527},[141,1237,1077],{"class":218},[141,1239,791],{"class":186},[141,1241,819],{"class":151},[141,1243,822],{"class":186},[141,1245,825],{"class":244},[141,1247,1248,1250,1252,1254,1256],{"class":143,"line":533},[141,1249,1090],{"class":218},[141,1251,791],{"class":186},[141,1253,835],{"class":151},[141,1255,822],{"class":186},[141,1257,825],{"class":244},[141,1259,1260,1262],{"class":143,"line":539},[141,1261,1103],{"class":218},[141,1263,847],{"class":186},[141,1265,1266,1268,1270,1272],{"class":143,"line":887},[141,1267,1110],{"class":218},[141,1269,791],{"class":186},[141,1271,857],{"class":151},[141,1273,797],{"class":186},[141,1275,1276,1278,1280,1282],{"class":143,"line":893},[141,1277,1121],{"class":218},[141,1279,791],{"class":186},[141,1281,869],{"class":151},[141,1283,797],{"class":186},[141,1285,1286],{"class":143,"line":899},[141,1287,930],{"class":186},[141,1289,1290],{"class":143,"line":912},[141,1291,1292],{"class":186},"  });\n",[141,1294,1295,1298,1301,1303,1306],{"class":143,"line":927},[141,1296,1297],{"class":186},"}, [",[141,1299,1300],{"class":232},"router",[141,1302,236],{"class":186},[141,1304,1305],{"class":218},"asPath",[141,1307,1308],{"class":186},"]);\n",[118,1310,1311,1319,1414,1419],{"v-slot:web-react":120},[106,1312,753,1313,757,1315,761,1317,236],{},[138,1314,756],{},[138,1316,760],{},[138,1318,764],{},[132,1320,1322],{"className":728,"code":1321,"language":730,"meta":120,"style":120},"await Rupt.attach({\n  client_id: \"client_id\",\n  account: \"account_id\",\n  email: \"user_email\", \u002F\u002F Optional\n  phone: \"user_phone\", \u002F\u002F Optional\n  redirect_urls: {\n    logout_url: \"https:\u002F\u002Fyour-logout-url.com\",\n    new_account_url: \"https:\u002F\u002Fyour-create-new-account-url.com\",\n  },\n});\n",[138,1323,1324,1336,1346,1356,1368,1380,1386,1396,1406,1410],{"__ignoreMap":120},[141,1325,1326,1328,1330,1332,1334],{"class":143,"line":144},[141,1327,774],{"class":737},[141,1329,741],{"class":232},[141,1331,236],{"class":186},[141,1333,756],{"class":147},[141,1335,783],{"class":186},[141,1337,1338,1340,1342,1344],{"class":143,"line":222},[141,1339,788],{"class":218},[141,1341,791],{"class":186},[141,1343,794],{"class":151},[141,1345,797],{"class":186},[141,1347,1348,1350,1352,1354],{"class":143,"line":474},[141,1349,802],{"class":218},[141,1351,791],{"class":186},[141,1353,807],{"class":151},[141,1355,797],{"class":186},[141,1357,1358,1360,1362,1364,1366],{"class":143,"line":482},[141,1359,814],{"class":218},[141,1361,791],{"class":186},[141,1363,819],{"class":151},[141,1365,822],{"class":186},[141,1367,825],{"class":244},[141,1369,1370,1372,1374,1376,1378],{"class":143,"line":491},[141,1371,830],{"class":218},[141,1373,791],{"class":186},[141,1375,835],{"class":151},[141,1377,822],{"class":186},[141,1379,825],{"class":244},[141,1381,1382,1384],{"class":143,"line":499},[141,1383,844],{"class":218},[141,1385,847],{"class":186},[141,1387,1388,1390,1392,1394],{"class":143,"line":507},[141,1389,852],{"class":218},[141,1391,791],{"class":186},[141,1393,857],{"class":151},[141,1395,797],{"class":186},[141,1397,1398,1400,1402,1404],{"class":143,"line":527},[141,1399,864],{"class":218},[141,1401,791],{"class":186},[141,1403,869],{"class":151},[141,1405,797],{"class":186},[141,1407,1408],{"class":143,"line":533},[141,1409,876],{"class":186},[141,1411,1412],{"class":143,"line":539},[141,1413,942],{"class":186},[106,1415,753,1416,1418],{},[138,1417,756],{}," function on every page as soon as you have the account id available.",[106,1420,1421,1425,1426],{},[1422,1423,1424],"strong",{},"You can do this in any functional React component that exists on every page."," For more on this refer to the advanced section: ",[399,1427,951],{"href":1428},"\u002Fdocs\u002Fadvanced\u002Fwhen-to-call-the-attach-function",[118,1430,1431,1439,1550],{"v-slot:web-vue":120},[106,1432,753,1433,757,1435,761,1437,236],{},[138,1434,756],{},[138,1436,760],{},[138,1438,764],{},[132,1440,1442],{"className":728,"code":1441,"language":730,"meta":120,"style":120},"import Rupt from \"rupt\";\n\nawait Rupt.attach({\n  client_id: \"client_id\",\n  account: \"account_id\",\n  email: \"user_email\", \u002F\u002F Optional\n  phone: \"user_phone\", \u002F\u002F Optional\n  redirect_urls: {\n    logout_url: \"https:\u002F\u002Fyour-logout-url.com\",\n    new_account_url: \"https:\u002F\u002Fyour-create-new-account-url.com\",\n  },\n});\n",[138,1443,1444,1456,1460,1472,1482,1492,1504,1516,1522,1532,1542,1546],{"__ignoreMap":120},[141,1445,1446,1448,1450,1452,1454],{"class":143,"line":144},[141,1447,738],{"class":737},[141,1449,741],{"class":218},[141,1451,744],{"class":737},[141,1453,747],{"class":151},[141,1455,750],{"class":186},[141,1457,1458],{"class":143,"line":222},[141,1459,1009],{"emptyLinePlaceholder":1008},[141,1461,1462,1464,1466,1468,1470],{"class":143,"line":474},[141,1463,774],{"class":737},[141,1465,741],{"class":232},[141,1467,236],{"class":186},[141,1469,756],{"class":147},[141,1471,783],{"class":186},[141,1473,1474,1476,1478,1480],{"class":143,"line":482},[141,1475,788],{"class":218},[141,1477,791],{"class":186},[141,1479,794],{"class":151},[141,1481,797],{"class":186},[141,1483,1484,1486,1488,1490],{"class":143,"line":491},[141,1485,802],{"class":218},[141,1487,791],{"class":186},[141,1489,807],{"class":151},[141,1491,797],{"class":186},[141,1493,1494,1496,1498,1500,1502],{"class":143,"line":499},[141,1495,814],{"class":218},[141,1497,791],{"class":186},[141,1499,819],{"class":151},[141,1501,822],{"class":186},[141,1503,825],{"class":244},[141,1505,1506,1508,1510,1512,1514],{"class":143,"line":507},[141,1507,830],{"class":218},[141,1509,791],{"class":186},[141,1511,835],{"class":151},[141,1513,822],{"class":186},[141,1515,825],{"class":244},[141,1517,1518,1520],{"class":143,"line":527},[141,1519,844],{"class":218},[141,1521,847],{"class":186},[141,1523,1524,1526,1528,1530],{"class":143,"line":533},[141,1525,852],{"class":218},[141,1527,791],{"class":186},[141,1529,857],{"class":151},[141,1531,797],{"class":186},[141,1533,1534,1536,1538,1540],{"class":143,"line":539},[141,1535,864],{"class":218},[141,1537,791],{"class":186},[141,1539,869],{"class":151},[141,1541,797],{"class":186},[141,1543,1544],{"class":143,"line":887},[141,1545,876],{"class":186},[141,1547,1548],{"class":143,"line":893},[141,1549,942],{"class":186},[106,1551,753,1552,1554,1555,1558,1559],{},[138,1553,756],{}," function on every page as soon as you have the account id available. For example, in the Vue.js root ",[138,1556,1557],{},"App.vue"," component, you can do this in the setup script block. this will ensure that the device is attached to the account on every page. For more on this refer to the advanced section: ",[399,1560,951],{"href":66},[118,1562,1563,1568,1578,1837,1840,1843,1850],{"v-slot:ios-swift":120},[1564,1565],"div",{"className":1566},[1567],"my-6",[122,1569,1571],{"id":1570},"option-1-using-viewcontrollers-or-storyboards",[141,1572,1577],{"className":1573},[1574,1575,1576],"text-base-content\u002F90","uppercase","font-semibold","Option 1: Using ViewControllers or Storyboards",[392,1579,1580,1693],{},[395,1581,1582,1583,1586,1587,1590,1591,434,1594,1597,1598,236,1601,1683,1686,1687,1690,1691,236],{},"In your ",[138,1584,1585],{},"AppDelegate",", import the ",[138,1588,1589],{},"RuptClient"," SDK and initialize it with your ",[138,1592,1593],{},"clientID",[138,1595,1596],{},"useViewController"," set to ",[138,1599,1600],{},"true",[132,1602,1606],{"className":1603,"code":1604,"language":1605,"meta":120,"style":120},"language-swift shiki shiki-themes one-dark-pro monokai","import RuptClient\n\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n  private let rupt = Rupt(clientID: \"xxxxx-xxx-xxxx-xxxx-xxxxxxx\", useViewController: true)\n}\n","swift",[138,1607,1608,1616,1620,1642,1679],{"__ignoreMap":120},[141,1609,1610,1612],{"class":143,"line":144},[141,1611,738],{"class":737},[141,1613,1615],{"class":1614},"shu0r"," RuptClient\n",[141,1617,1618],{"class":143,"line":222},[141,1619,1009],{"emptyLinePlaceholder":1008},[141,1621,1622,1625,1628,1630,1634,1636,1639],{"class":143,"line":474},[141,1623,1624],{"class":991},"class",[141,1626,1627],{"class":1614}," AppDelegate",[141,1629,791],{"class":186},[141,1631,1633],{"class":1632},"sSu5s","UIResponder",[141,1635,822],{"class":186},[141,1637,1638],{"class":1632},"UIApplicationDelegate ",[141,1640,1641],{"class":186},"{\n",[141,1643,1644,1647,1650,1653,1656,1659,1661,1663,1665,1668,1670,1672,1674,1677],{"class":143,"line":482},[141,1645,1646],{"class":737},"  private",[141,1648,1649],{"class":737}," let",[141,1651,1652],{"class":186}," rupt ",[141,1654,198],{"class":1655},"suS8p",[141,1657,741],{"class":1658},"s54Uj",[141,1660,518],{"class":186},[141,1662,1593],{"class":1658},[141,1664,791],{"class":186},[141,1666,1667],{"class":151},"\"xxxxx-xxx-xxxx-xxxx-xxxxxxx\"",[141,1669,822],{"class":186},[141,1671,1596],{"class":1658},[141,1673,791],{"class":186},[141,1675,1600],{"class":1676},"sRaZW",[141,1678,524],{"class":186},[141,1680,1681],{"class":143,"line":491},[141,1682,542],{"class":186},[1684,1685],"br",{},"replace ",[138,1688,1689],{},"xxxxx-xxx-xxxx-xxxx-xxxxxxx"," with your ",[138,1692,1593],{},[395,1694,1582,1695,1697,1698,1701,1702,1705,1706],{},[138,1696,1585],{},", set the ",[138,1699,1700],{},"userID"," and attach the device to the user in the ",[138,1703,1704],{},"didFinishLaunchingWithOptions"," method.",[132,1707,1709],{"className":1603,"code":1708,"language":1605,"meta":120,"style":120},"func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n   rupt.setUserID(\"\u003C#user_id#>\")\n   rupt.attach()\n   rupt.onLogoutCurrentDevice = {\n       \u002F\u002FTODO: log the user out of this device\n   }\n   rupt.onCreateNewAccount = {\n       \u002F\u002FTODO: logout the current account and guide the user to create a new account\n   }\n   return true\n }\n",[138,1710,1711,1760,1775,1783,1794,1799,1804,1815,1820,1824,1832],{"__ignoreMap":120},[141,1712,1713,1716,1719,1721,1724,1727,1730,1732,1735,1738,1742,1745,1748,1751,1754,1758],{"class":143,"line":144},[141,1714,1715],{"class":991},"func",[141,1717,1718],{"class":147}," application",[141,1720,518],{"class":186},[141,1722,1723],{"class":147},"_",[141,1725,1718],{"class":1726},"smYXY",[141,1728,1729],{"class":186},": UIApplication, ",[141,1731,1704],{"class":147},[141,1733,1734],{"class":1726}," launchOptions",[141,1736,1737],{"class":186},": [UIApplication.LaunchOptionsKey: ",[141,1739,1741],{"class":1740},"sXBcj","Any",[141,1743,1744],{"class":186},"]",[141,1746,1747],{"class":1655},"?",[141,1749,1750],{"class":186},") ",[141,1752,1753],{"class":1655},"->",[141,1755,1757],{"class":1756},"sZK-7"," Bool",[141,1759,460],{"class":186},[141,1761,1762,1765,1768,1770,1773],{"class":143,"line":222},[141,1763,1764],{"class":186},"   rupt.",[141,1766,1767],{"class":1658},"setUserID",[141,1769,518],{"class":186},[141,1771,1772],{"class":151},"\"\u003C#user_id#>\"",[141,1774,524],{"class":186},[141,1776,1777,1779,1781],{"class":143,"line":474},[141,1778,1764],{"class":186},[141,1780,756],{"class":1658},[141,1782,488],{"class":186},[141,1784,1785,1787,1790,1792],{"class":143,"line":482},[141,1786,1764],{"class":186},[141,1788,1789],{"class":218},"onLogoutCurrentDevice",[141,1791,229],{"class":1655},[141,1793,460],{"class":186},[141,1795,1796],{"class":143,"line":491},[141,1797,1798],{"class":244},"       \u002F\u002FTODO: log the user out of this device\n",[141,1800,1801],{"class":143,"line":499},[141,1802,1803],{"class":186},"   }\n",[141,1805,1806,1808,1811,1813],{"class":143,"line":507},[141,1807,1764],{"class":186},[141,1809,1810],{"class":218},"onCreateNewAccount",[141,1812,229],{"class":1655},[141,1814,460],{"class":186},[141,1816,1817],{"class":143,"line":527},[141,1818,1819],{"class":244},"       \u002F\u002FTODO: logout the current account and guide the user to create a new account\n",[141,1821,1822],{"class":143,"line":533},[141,1823,1803],{"class":186},[141,1825,1826,1829],{"class":143,"line":539},[141,1827,1828],{"class":737},"   return",[141,1830,1831],{"class":1676}," true\n",[141,1833,1834],{"class":143,"line":887},[141,1835,1836],{"class":186}," }\n",[1838,1839],"hr",{},[1564,1841],{"className":1842},[1567],[122,1844,1846],{"id":1845},"option-2-using-swiftui",[141,1847,1849],{"className":1848},[1574,1575,1576],"Option 2: Using SwiftUI",[392,1851,1852,1940],{},[395,1853,1854,1855,1586,1858,1590,1860,434,1862,1597,1864,1867,1868,236,1870,1934,1686,1936,1690,1938,236],{},"In your top ",[138,1856,1857],{},"ContentView",[138,1859,1589],{},[138,1861,1593],{},[138,1863,1596],{},[138,1865,1866],{},"false"," or leave it out as it defaults to ",[138,1869,1866],{},[132,1871,1873],{"className":1603,"code":1872,"language":1605,"meta":120,"style":120},"import RuptClient\n\nstruct ContentView: View {\n  private let rupt = Rupt(clientID: \"xxxxx-xxx-xxxx-xxxx-xxxxxxx\", useViewController: false)\n}\n",[138,1874,1875,1881,1885,1900,1930],{"__ignoreMap":120},[141,1876,1877,1879],{"class":143,"line":144},[141,1878,738],{"class":737},[141,1880,1615],{"class":1614},[141,1882,1883],{"class":143,"line":222},[141,1884,1009],{"emptyLinePlaceholder":1008},[141,1886,1887,1890,1893,1895,1898],{"class":143,"line":474},[141,1888,1889],{"class":991},"struct",[141,1891,1892],{"class":1614}," ContentView",[141,1894,791],{"class":186},[141,1896,1897],{"class":1632},"View ",[141,1899,1641],{"class":186},[141,1901,1902,1904,1906,1908,1910,1912,1914,1916,1918,1920,1922,1924,1926,1928],{"class":143,"line":482},[141,1903,1646],{"class":737},[141,1905,1649],{"class":737},[141,1907,1652],{"class":186},[141,1909,198],{"class":1655},[141,1911,741],{"class":1658},[141,1913,518],{"class":186},[141,1915,1593],{"class":1658},[141,1917,791],{"class":186},[141,1919,1667],{"class":151},[141,1921,822],{"class":186},[141,1923,1596],{"class":1658},[141,1925,791],{"class":186},[141,1927,1866],{"class":1676},[141,1929,524],{"class":186},[141,1931,1932],{"class":143,"line":491},[141,1933,542],{"class":186},[1684,1935],{},[138,1937,1689],{},[138,1939,1593],{},[395,1941,1582,1942,1697,1944,1701,1946,1949,1950,1705,1953],{},[138,1943,1857],{},[138,1945,1700],{},[138,1947,1948],{},"init"," or ",[138,1951,1952],{},"onAppear",[132,1954,1956],{"className":1603,"code":1955,"language":1605,"meta":120,"style":120},"struct ContentView: View {\n  private let rupt = Rupt(clientID: \"xxxxx-xxx-xxxx-xxxx-xxxxxxx\", useViewController: false)\n\n  init() {\n    rupt.setUserID(\"\u003C#user_id#>\")\n    rupt.attach()\n    rupt.onLogoutCurrentDevice = {\n     \u002F\u002FTODO: log the user out of this device\n    }\n    rupt.onCreateNewAccount = {\n     \u002F\u002FTODO: logout the current account and guide the user to create a new account\n    }\n  }\n}\n",[138,1957,1958,1970,2000,2004,2012,2025,2033,2043,2048,2052,2062,2067,2071,2076],{"__ignoreMap":120},[141,1959,1960,1962,1964,1966,1968],{"class":143,"line":144},[141,1961,1889],{"class":991},[141,1963,1892],{"class":1614},[141,1965,791],{"class":186},[141,1967,1897],{"class":1632},[141,1969,1641],{"class":186},[141,1971,1972,1974,1976,1978,1980,1982,1984,1986,1988,1990,1992,1994,1996,1998],{"class":143,"line":222},[141,1973,1646],{"class":737},[141,1975,1649],{"class":737},[141,1977,1652],{"class":186},[141,1979,198],{"class":1655},[141,1981,741],{"class":1658},[141,1983,518],{"class":186},[141,1985,1593],{"class":1658},[141,1987,791],{"class":186},[141,1989,1667],{"class":151},[141,1991,822],{"class":186},[141,1993,1596],{"class":1658},[141,1995,791],{"class":186},[141,1997,1866],{"class":1676},[141,1999,524],{"class":186},[141,2001,2002],{"class":143,"line":474},[141,2003,1009],{"emptyLinePlaceholder":1008},[141,2005,2006,2009],{"class":143,"line":482},[141,2007,2008],{"class":991},"  init",[141,2010,2011],{"class":186},"() {\n",[141,2013,2014,2017,2019,2021,2023],{"class":143,"line":491},[141,2015,2016],{"class":186},"    rupt.",[141,2018,1767],{"class":1658},[141,2020,518],{"class":186},[141,2022,1772],{"class":151},[141,2024,524],{"class":186},[141,2026,2027,2029,2031],{"class":143,"line":499},[141,2028,2016],{"class":186},[141,2030,756],{"class":1658},[141,2032,488],{"class":186},[141,2034,2035,2037,2039,2041],{"class":143,"line":507},[141,2036,2016],{"class":186},[141,2038,1789],{"class":218},[141,2040,229],{"class":1655},[141,2042,460],{"class":186},[141,2044,2045],{"class":143,"line":527},[141,2046,2047],{"class":244},"     \u002F\u002FTODO: log the user out of this device\n",[141,2049,2050],{"class":143,"line":533},[141,2051,536],{"class":186},[141,2053,2054,2056,2058,2060],{"class":143,"line":539},[141,2055,2016],{"class":186},[141,2057,1810],{"class":218},[141,2059,229],{"class":1655},[141,2061,460],{"class":186},[141,2063,2064],{"class":143,"line":887},[141,2065,2066],{"class":244},"     \u002F\u002FTODO: logout the current account and guide the user to create a new account\n",[141,2068,2069],{"class":143,"line":893},[141,2070,536],{"class":186},[141,2072,2073],{"class":143,"line":899},[141,2074,2075],{"class":186},"  }\n",[141,2077,2078],{"class":143,"line":912},[141,2079,542],{"class":186},[118,2081,2082,2169,2291],{"v-slot:android-kotlin":120},[395,2083,2084,2085,2115,2116],{},"Configure the SDK as soon as you have the user's account ID. This should be done as soon as the app launches or as soon as the user logs in.\n",[132,2086,2088],{"className":449,"code":2087,"language":451,"meta":120,"style":120},"\u002F\u002F REQUIRED\nRupt.configure(\"\u003C#client id#>\", \"account_id\", email, phone, onCreateNewAccount, onLogoutCurrentDevice, onLimitExceeded)\n",[138,2089,2090,2095],{"__ignoreMap":120},[141,2091,2092],{"class":143,"line":144},[141,2093,2094],{"class":244},"\u002F\u002F REQUIRED\n",[141,2096,2097,2100,2103,2105,2108,2110,2112],{"class":143,"line":222},[141,2098,2099],{"class":186},"Rupt.",[141,2101,2102],{"class":147},"configure",[141,2104,518],{"class":186},[141,2106,2107],{"class":151},"\"\u003C#client id#>\"",[141,2109,822],{"class":186},[141,2111,807],{"class":151},[141,2113,2114],{"class":186},", email, phone, onCreateNewAccount, onLogoutCurrentDevice, onLimitExceeded)\n","\nThe parameters are:\n",[2117,2118,2119,2125,2131,2137,2143,2153,2161],"ul",{},[395,2120,2121,2124],{},[138,2122,2123],{},"client id","*: Your Rupt client ID. You can find this on the Rupt dashboard.",[395,2126,2127,2130],{},[138,2128,2129],{},"account_id","*: The account ID of the user. This is a unique identifier for the user.",[395,2132,2133,2136],{},[138,2134,2135],{},"email",": The email of the user. This is optional. If you want to trigger 2FA when account sharing is detected, you should provide this.",[395,2138,2139,2142],{},[138,2140,2141],{},"phone",": The phone number of the user. This is optional. If you want to trigger 2FA when account sharing is detected, you should provide this (if available).",[395,2144,2145,2147,2148,2152],{},[138,2146,1810],{},": A callback that is triggered when a user wants to create new account. See ",[399,2149,2151],{"href":2150},"#step-3-handle-callbacks","step 3"," for more information.",[395,2154,2155,2157,2158,2152],{},[138,2156,1789],{},": A callback that is triggered when the wants to logout of this device (or is kicked out by another remote device). See ",[399,2159,2151],{"href":2160},"#handle-callbacks",[395,2162,2163,2166,2167,2152],{},[138,2164,2165],{},"onLimitExceeded",": A callback that is triggered when the user has too many devices using their account. See ",[399,2168,2151],{"href":2160},[395,2170,2171,2172,2175,2176,2179,2180,2253,2254],{},"Add permissions and register the ",[138,2173,2174],{},"ChallengeActivity"," in your ",[138,2177,2178],{},"AndroidManifest.xml"," file.\n",[132,2181,2185],{"className":2182,"code":2183,"language":2184,"meta":120,"style":120},"language-xml shiki shiki-themes one-dark-pro monokai","\u003Cuses-permission android:name=\"android.permission.INTERNET\" \u002F>\n\u003Cuses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" \u002F>\n\n\u003Cactivity\n         android:name=\"dev.rupt.rupt.ui.ChallengeActivity\"\n         android:theme=\"@style\u002FTheme.MaterialComponents.NoActionBar\" \u002F>\n","xml",[138,2186,2187,2205,2220,2224,2231,2241],{"__ignoreMap":120},[141,2188,2189,2191,2194,2197,2199,2202],{"class":143,"line":144},[141,2190,187],{"class":186},[141,2192,2193],{"class":190},"uses-permission",[141,2195,2196],{"class":194}," android:name",[141,2198,198],{"class":186},[141,2200,2201],{"class":151},"\"android.permission.INTERNET\"",[141,2203,2204],{"class":186}," \u002F>\n",[141,2206,2207,2209,2211,2213,2215,2218],{"class":143,"line":222},[141,2208,187],{"class":186},[141,2210,2193],{"class":190},[141,2212,2196],{"class":194},[141,2214,198],{"class":186},[141,2216,2217],{"class":151},"\"android.permission.ACCESS_NETWORK_STATE\"",[141,2219,2204],{"class":186},[141,2221,2222],{"class":143,"line":474},[141,2223,1009],{"emptyLinePlaceholder":1008},[141,2225,2226,2228],{"class":143,"line":482},[141,2227,187],{"class":186},[141,2229,2230],{"class":190},"activity\n",[141,2232,2233,2236,2238],{"class":143,"line":491},[141,2234,2235],{"class":194},"         android:name",[141,2237,198],{"class":186},[141,2239,2240],{"class":151},"\"dev.rupt.rupt.ui.ChallengeActivity\"\n",[141,2242,2243,2246,2248,2251],{"class":143,"line":499},[141,2244,2245],{"class":194},"         android:theme",[141,2247,198],{"class":186},[141,2249,2250],{"class":151},"\"@style\u002FTheme.MaterialComponents.NoActionBar\"",[141,2252,2204],{"class":186},"\nNotes:\n",[2117,2255,2256,2266,2281],{},[395,2257,2258,2259,2261,2262,2265],{},"The ",[138,2260,2174],{}," is the activity that will be shown to the user when account sharing is detected ",[1422,2263,2264],{},"AND account sharing protection is enabled",". It will never show if the setting is disabled.",[395,2267,2258,2268,2270,2271,2274,2275,2277,2278,236],{},[138,2269,2174],{}," expects a theme that extends from ",[138,2272,2273],{},"Theme.MaterialComponents",". If you have a custom theme, ensure it extends from ",[138,2276,2273],{}," or you can just use ",[138,2279,2280],{},"@style\u002FTheme.MaterialComponents",[395,2282,2283,2284,2287,2288,2290],{},"Prefer ",[138,2285,2286],{},"NoActionBar"," theme to avoid issues with the ",[138,2289,2174],{}," back button being shown under system bars.",[395,2292,2293,2294,2344,2345,2347,2348],{},"Attach the device to the user so that Rupt can start monitoring the user's account sharing.\n",[132,2295,2297],{"className":449,"code":2296,"language":451,"meta":120,"style":120},"Rupt.attach(context) {\n   Log.d(\"Rupt\", \"Attached. Device Id -> ${Rupt.deviceId}\")\n}\n",[138,2298,2299,2308,2340],{"__ignoreMap":120},[141,2300,2301,2303,2305],{"class":143,"line":144},[141,2302,2099],{"class":186},[141,2304,756],{"class":147},[141,2306,2307],{"class":186},"(context) {\n",[141,2309,2310,2313,2316,2318,2321,2323,2326,2329,2332,2335,2338],{"class":143,"line":222},[141,2311,2312],{"class":186},"   Log.",[141,2314,2315],{"class":147},"d",[141,2317,518],{"class":186},[141,2319,2320],{"class":151},"\"Rupt\"",[141,2322,822],{"class":186},[141,2324,2325],{"class":151},"\"Attached. Device Id -> ",[141,2327,2328],{"class":737},"${",[141,2330,2331],{"class":186},"Rupt.deviceId",[141,2333,2334],{"class":737},"}",[141,2336,2337],{"class":151},"\"",[141,2339,524],{"class":186},[141,2341,2342],{"class":143,"line":474},[141,2343,542],{"class":186},"\nEnsure you call the ",[138,2346,756],{}," when the app enters the foreground state as well. This will improve account sharing detection results.\n",[247,2349,2350],{"type":249},[106,2351,2352,2353,2355],{},"Calling ",[138,2354,756],{}," multiple times will not create duplicate devices. It is perfectly safe.",[118,2357,2358,2361,2387,2397,2572],{"v-slot:react native-react":120},[395,2359,2360],{},"Import react-native UI component",[132,2362,2364],{"className":728,"code":2363,"language":730,"meta":120,"style":120},"import { RuptProvider } from \"@ruptjs\u002Frupt-react-native\";\n",[138,2365,2366],{"__ignoreMap":120},[141,2367,2368,2370,2373,2376,2379,2382,2385],{"class":143,"line":144},[141,2369,738],{"class":737},[141,2371,2372],{"class":186}," { ",[141,2374,2375],{"class":218},"RuptProvider",[141,2377,2378],{"class":186}," } ",[141,2380,2381],{"class":737},"from",[141,2383,2384],{"class":151}," \"@ruptjs\u002Frupt-react-native\"",[141,2386,750],{"class":186},[106,2388,2389,2390,2392,2393,761,2395,236],{},"Import the ",[138,2391,2375],{}," component to link the device to the account. You must pass the ",[138,2394,760],{},[138,2396,764],{},[132,2398,2400],{"className":728,"code":2399,"language":730,"meta":120,"style":120}," \u003CRuptProvider\n   \u002F\u002F required\n   clientId={client_id}\n   account={account_id}\n   \u002F\u002F optional\n   email={user_email},\n   phone={user_phone},\n   matadata={},\n   callbacks={{\n      onSuccess,\n      onChallenge,\n      onNewAccount,\n      onSuspended,\n      onLimitExceeded,\n      onCurrentDeviceLogout,\n   }}\n   debug={false}\n   \u002F>\n",[138,2401,2402,2410,2415,2430,2443,2448,2465,2481,2493,2504,2511,2518,2525,2532,2539,2546,2553,2566],{"__ignoreMap":120},[141,2403,2404,2407],{"class":143,"line":144},[141,2405,2406],{"class":186}," \u003C",[141,2408,2409],{"class":1756},"RuptProvider\n",[141,2411,2412],{"class":143,"line":222},[141,2413,2414],{"class":244},"   \u002F\u002F required\n",[141,2416,2417,2421,2423,2426,2428],{"class":143,"line":474},[141,2418,2420],{"class":2419},"sV0fC","   clientId",[141,2422,198],{"class":228},[141,2424,2425],{"class":737},"{",[141,2427,760],{"class":218},[141,2429,542],{"class":737},[141,2431,2432,2435,2437,2439,2441],{"class":143,"line":482},[141,2433,2434],{"class":2419},"   account",[141,2436,198],{"class":228},[141,2438,2425],{"class":737},[141,2440,2129],{"class":218},[141,2442,542],{"class":737},[141,2444,2445],{"class":143,"line":491},[141,2446,2447],{"class":244},"   \u002F\u002F optional\n",[141,2449,2450,2453,2455,2457,2460,2462],{"class":143,"line":499},[141,2451,2452],{"class":2419},"   email",[141,2454,198],{"class":228},[141,2456,2425],{"class":737},[141,2458,2459],{"class":218},"user_email",[141,2461,2334],{"class":737},[141,2463,797],{"class":2464},"st1Fl",[141,2466,2467,2470,2472,2474,2477,2479],{"class":143,"line":507},[141,2468,2469],{"class":2419},"   phone",[141,2471,198],{"class":228},[141,2473,2425],{"class":737},[141,2475,2476],{"class":218},"user_phone",[141,2478,2334],{"class":737},[141,2480,797],{"class":2464},[141,2482,2483,2486,2488,2491],{"class":143,"line":527},[141,2484,2485],{"class":2419},"   matadata",[141,2487,198],{"class":228},[141,2489,2490],{"class":737},"{}",[141,2492,797],{"class":2464},[141,2494,2495,2498,2500,2502],{"class":143,"line":533},[141,2496,2497],{"class":2419},"   callbacks",[141,2499,198],{"class":228},[141,2501,2425],{"class":737},[141,2503,1641],{"class":186},[141,2505,2506,2509],{"class":143,"line":539},[141,2507,2508],{"class":218},"      onSuccess",[141,2510,797],{"class":186},[141,2512,2513,2516],{"class":143,"line":887},[141,2514,2515],{"class":218},"      onChallenge",[141,2517,797],{"class":186},[141,2519,2520,2523],{"class":143,"line":893},[141,2521,2522],{"class":218},"      onNewAccount",[141,2524,797],{"class":186},[141,2526,2527,2530],{"class":143,"line":899},[141,2528,2529],{"class":218},"      onSuspended",[141,2531,797],{"class":186},[141,2533,2534,2537],{"class":143,"line":912},[141,2535,2536],{"class":218},"      onLimitExceeded",[141,2538,797],{"class":186},[141,2540,2541,2544],{"class":143,"line":927},[141,2542,2543],{"class":218},"      onCurrentDeviceLogout",[141,2545,797],{"class":186},[141,2547,2548,2551],{"class":143,"line":933},[141,2549,2550],{"class":186},"   }",[141,2552,542],{"class":737},[141,2554,2555,2558,2560,2562,2564],{"class":143,"line":939},[141,2556,2557],{"class":2419},"   debug",[141,2559,198],{"class":228},[141,2561,2425],{"class":737},[141,2563,1866],{"class":1676},[141,2565,542],{"class":737},[141,2567,2569],{"class":143,"line":2568},18,[141,2570,2571],{"class":186},"   \u002F>\n",[106,2573,2574,2575,2577,2578,2580],{},"For advanced use cases or custom implementations, you can call the ",[138,2576,756],{}," function directly and skip the ",[138,2579,2375],{}," component.",[247,2582,2583],{"type":249},[106,2584,2258,2585,434,2587,2589,2590,2592,2593,2595],{},[138,2586,2135],{},[138,2588,2141],{}," are optional but strongly recommended. If you want to ask users to verify accounts before they kick out other people using their account, you should provide the ",[138,2591,2135],{}," and\u002For ",[138,2594,2141],{}," fields.",[106,2597,2598,2599],{},"Rupt will take care of the rest. If Rupt determines there's misbehavior, and challenges are enabled, it will trigger a challenge. For more on this, see: ",[399,2600,27],{"href":28},[2602,2603,2604],"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 .sskXI, html code.shiki .sskXI{--shiki-default:#E06C75;--shiki-dark:#F8F8F2}html pre.shiki code .sBBc0, html code.shiki .sBBc0{--shiki-default:#56B6C2;--shiki-dark:#F92672}html pre.shiki code .syDQ0, html code.shiki .syDQ0{--shiki-default:#E5C07B;--shiki-dark:#F8F8F2}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 .sqnWQ, html code.shiki .sqnWQ{--shiki-default:#C678DD;--shiki-dark:#F92672}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 .shu0r, html code.shiki .shu0r{--shiki-default:#E5C07B;--shiki-default-text-decoration:inherit;--shiki-dark:#A6E22E;--shiki-dark-text-decoration:underline}html pre.shiki code .sSu5s, html code.shiki .sSu5s{--shiki-default:#E5C07B;--shiki-default-font-style:inherit;--shiki-default-text-decoration:inherit;--shiki-dark:#A6E22E;--shiki-dark-font-style:italic;--shiki-dark-text-decoration:underline}html pre.shiki code .suS8p, html code.shiki .suS8p{--shiki-default:#ABB2BF;--shiki-dark:#F92672}html pre.shiki code .s54Uj, html code.shiki .s54Uj{--shiki-default:#61AFEF;--shiki-dark:#66D9EF}html pre.shiki code .sRaZW, html code.shiki .sRaZW{--shiki-default:#D19A66;--shiki-dark:#AE81FF}html pre.shiki code .smYXY, html code.shiki .smYXY{--shiki-default:#ABB2BF;--shiki-default-font-style:italic;--shiki-dark:#FD971F;--shiki-dark-font-style:italic}html pre.shiki code .sXBcj, html code.shiki .sXBcj{--shiki-default:#ABB2BF;--shiki-default-font-style:inherit;--shiki-dark:#66D9EF;--shiki-dark-font-style:italic}html pre.shiki code .sZK-7, html code.shiki .sZK-7{--shiki-default:#E5C07B;--shiki-default-font-style:inherit;--shiki-dark:#66D9EF;--shiki-dark-font-style:italic}html pre.shiki code .sV0fC, html code.shiki .sV0fC{--shiki-default:#D19A66;--shiki-default-font-style:italic;--shiki-dark:#A6E22E;--shiki-dark-font-style:inherit}html pre.shiki code .st1Fl, html code.shiki .st1Fl{--shiki-default:#FFFFFF;--shiki-dark:#F44747}",{"title":120,"searchDepth":222,"depth":222,"links":2606},[2607,2608],{"id":112,"depth":222,"text":113},{"id":699,"depth":222,"text":700,"children":2609},[2610],{"id":713,"depth":474,"text":718},"Activate Rupt on your website in minutes.","md",{"head":2614},{"title":2615},"Detect & prevent account sharing quickly",{"title":14,"description":2611},{"loc":15},"hftloKiNv_lJ99auG0YwnocbGRYAOfbuQ6FpK5g6lmo",1777051955099]