@@ -8,11 +8,18 @@ sequenceDiagram
88 participant i as Incode<br>Hosted<br>Workflow
99 participant m as Customer<br>Site
1010 participant b as Backend
11+ participant a as API
1112
1213 activate m
13- m-->>b: Get Onboarding URL
14- note over b: runs /omni/start,<br>/omni/onboarding-url
15- b-->>m: {url, token}
14+ m->>b: Start Onboarding
15+ b->>a: configurationId
16+ note over a: /omni/start
17+ a->>b: token, interviewId
18+ note over b: Save Token
19+ b->>a: token
20+ note over a:/0/omni/onboarding-url
21+ a->>b: url
22+ b->>m: {url, interviewId}
1623 note over m: Create Iframe with URL
1724 m->>i: Onboarding starts in backend
1825
@@ -23,17 +30,23 @@ sequenceDiagram
2330 deactivate i
2431 and
2532 loop
26- m-->>b: {token}
27- note over b: Fetch Onboarding Status
28- b-->>m: {onboardingStatus}
33+ m->>b: Get Status<br>{interviewId}
34+ note over b: Get Token
35+ b->>a: token
36+ note over a: /0/omni/get/onboarding/status
37+ a->>b: {onboardingStatus}
38+ b->>m: {onboardingStatus}
2939 note over m: If ONBOARDING_FINISHED then<br>continue
3040 end
3141 end
3242
3343 note over m: Destroy Iframe
34- m-->>b: Fetch Score<br>{token}
35- note over b: Fetch Score
36- b-->>m: {overallStatus}
44+ m->>b: Fetch Score<br>{interviewId}
45+ note over b: Get Token
46+ b->>a: token
47+ note over a: /0/omni/get/score
48+ a->>b: {overallStatus}
49+ b->>m: {overallStatus}
3750 note over m: Done
3851 deactivate m
3952```
@@ -50,7 +63,7 @@ The APIKEY should never be exposed in the frontend.
5063
5164# Install
5265First install all the required packages
53- ```
66+ ``` bash
5467npm install
5568```
5669
@@ -66,14 +79,25 @@ VITE_FAKE_BACKEND_FLOWID=
6679
6780# Development
6881This repo is configured so run it in development by executing
69- ```
82+ ``` bash
7083npm run dev
7184```
7285
7386You will get a hot reloading environment that exposes the page in
7487localhost and in the ip of the machine in case you want to try it
7588in your cellphone.
7689
90+ ## Session Storage
91+
92+ This sample application uses localStorage to store session data (token and interviewId). In a production environment, you should:
93+
94+ 1 . Store tokens securely on your backend
95+ 2 . Implement proper session management
96+ 3 . Handle token expiration and renewal
97+ 4 . Consider security implications of storing sensitive data
98+
99+ The implementation in this demo is for demonstration purposes only.
100+
77101# Author
78102
79103© Incode Technologies Inc. All rights reserved.
0 commit comments