You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vite-web-sdk/README.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,20 @@
1
1
# Vite Web SDK example
2
-
This examples runs the basic create session -> frontId -> backID -> processId -> Selfie -> faceMatch -> getFinishStatus flow, the code is simple enough to insert or remove any step
3
-
for testing or creating proof of concepts.
2
+
This examples runs the basic create session -> renderRedirectToMobile -> userConsent -> frontId -> backID ->
3
+
processId -> Selfie -> faceMatch -> getFinishStatus flow, the code is simple enough to insert or remove any
4
+
step for testing or creating proof of concepts.
5
+
6
+
The code is made with renderRedirectToMobile as first step, if it detects that the user is in desktop it will
7
+
present renderRedirectToMobile with an `URL` that points to this same file using the `VITE_LOCAL_SERVER_URL`
8
+
enviroment variable + a generated `uuid` that we received from the call to `/start`.
9
+
10
+
The `renderRedirectToMobile` has a behaviour where it automatically polls for the status of the session, and
11
+
when it detects that the session has finished, it executes the `onSuccess` method to continue.
12
+
13
+
The URL when opened in mobile will read the `uuid` from the query params, and send it to `/start` to continue
14
+
the session instead of creating a new one.
15
+
16
+
The `uuid` links both desktop and mobile that are running in parallel to give the best possible experience to
17
+
the user.
4
18
5
19
# Requirements
6
20
Vite requires Node.js version 14.18+, 16+. some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
0 commit comments