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
Updated diagram and workings to final approved version of handling auth (#5)
* diagram added
* Implemented review suggestions:
* warning on how to respond errors
* changed from fakebackend to exampleBackend
* moved finishing of the session to the verify endpoint
* moved from "used" to "status", and now we reject or approve
* updated diagram
* correctly sending identityId to backend
* update diagram
* updated diagram with alts to clarify conditionals and actions on errors
Copy file name to clipboardExpand all lines: README.md
+56-27Lines changed: 56 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
# Face Authentication Validation Example
2
+
2
3
This project demonstrates a secure face authentication flow using Incode's WebSDK with proper validation and session management. The application implements:
3
4
4
-
-**User hint input** for authentication (customer ID, email, or phone)
5
+
-**User hint input** for authentication (customerId, email, or phone)
5
6
-**Face authentication** using Incode's renderAuthFace SDK
6
7
-**Session management** with IndexedDB to prevent reuse
7
8
-**Backend validation** to verify authentication integrity by:
8
-
- Matching candidate ID from the SDK with identity ID from the score API
9
+
- Matching candidate from the SDK with identityId from the score API
9
10
- Validating overall authentication status
10
11
- Preventing token tampering and session replay attacks
11
12
- Marking sessions as used to prevent reuse
@@ -21,47 +22,71 @@ sequenceDiagram
21
22
participant IncodeAPI
22
23
participant IndexedDB
23
24
24
-
Note over Frontend: Enter hint:<br> email/phone/identityId
25
-
Frontend->>Backend: Start Session in Backend
25
+
Note over Frontend: Enter hint:<br> identityId
26
+
Note over Frontend: WebSDK: create()
27
+
Frontend->>Backend: Start Session in Backend<br>{identityId}
26
28
Backend->>IncodeAPI: Create new session<br>{configurationId, apikey}
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.
60
81
61
82
# Install
83
+
62
84
Run `npm install`
85
+
63
86
# Config
87
+
64
88
Copy `.env.example` to `.env.local` and add your local values
0 commit comments