Navigation
View as Markdown

Migrating from v2 to v3

v3 is a new API with a new SDK on every platform. The clients are not drop-in compatible with v2, so plan for a real upgrade. The upside is that the v3 client is smaller: most of the wiring you did by hand now lives on a policy in the dashboard, and the SDK handles the rest.

This section walks the migration one product at a time. It starts with account sharing, the simplest one, on web and on iOS and Android.

What changed at a glance

v2 and v3 refer to the Rupt API. Each platform ships its own client library on top of it, and every library has its own version number. This table maps each API version to the library that talks to it:

PlatformAPI v2 libraryAPI v3 library
Webrupt 2.x@ruptjs/client 3.x
iOSRuptClient 3.8.1RuptClient 4.0.0
Androidcom.github.getrupt:kotlin 2.1.0dev.rupt.android:rupt-android 4.0.0

The library version and the API version are two different numbers. The v3 clients are @ruptjs/client 3.x, RuptClient 4.0.0, and rupt-android 4.0.0. They all talk to the same v3 API. When you see a version on a package, that's the library's version, not the API's.

The one idea to hold onto

v2 gave each product its own method. Account sharing was attach. v3 has a single entry point, evaluate, and the action names the product:

  • evaluate.access runs the account-sharing check (this was attach).
  • evaluate.login runs the login check.
  • evaluate.signup runs the signup check.

Challenges are self-managed now. In v2 you passed redirect URLs and challenge callbacks into the client. In v3 the challenge is configured on a policy in the dashboard, gated on the checks you choose, and the SDK surfaces it for you. Your client code shrinks to one call.

Account sharing is fully client-side: you call evaluate.access and Rupt handles detection, the challenge, owner verification, and device capping. There is no server step and no evaluation to consume. Login and signup do add a server-side verification, and they will get their own migration pages here.