|
1 | | -# Face Login Example |
2 | | -This sample does face Authentication following the next process. |
3 | | - |
4 | | -```mermaid |
5 | | -sequenceDiagram |
6 | | - participant w as WebSDK |
7 | | - participant b as Backend |
8 | | - participant a as API |
9 | | -
|
10 | | - note over w: create() |
11 | | - note over w: renderLogin()<br>Send identityId for 1:1 |
12 | | - alt faceMatch==false |
13 | | - note over w: User doesn't exists |
14 | | - else |
15 | | - w -->> b: transactionId<br>token<br>interviewId |
16 | | - note over b: myapp.com/api/auth |
17 | | - note over b: get adminToken |
18 | | - b-->> a: transactionId<br>token<br>interviewId<br>adminToken |
19 | | - note over a: /omni/authentication/verify |
20 | | - a-->>b: verified |
21 | | - b-->>w: verified |
22 | | - alt verified==true |
23 | | - note over w: Authentication Verified |
24 | | - else |
25 | | - note over w: Authentication is not valid |
26 | | - end |
27 | | - end |
28 | | -``` |
29 | | - |
30 | | -# Requirements |
31 | | -Vite requires Node.js version 14.18+, 16+. some templates require a higher Node.js |
32 | | -version to work, please upgrade if your package manager warns about it. |
33 | | - |
34 | | -## Backend Server |
35 | | -A backend server that will generate the url is needed for this sample, |
36 | | -luckily for you we already have sample server for PHP, NodeJS, Python, |
37 | | -PHP and Java and .NET, please reffer to our documentation on subject: |
38 | | -[Quick Start Sample Server](https://developer.incode.com/docs/quick-start-servers) |
39 | | - |
40 | | -In order to simplfy development, this repo is configured to reverse |
41 | | -proxy a local backend server (`http://localhost:3000`) in the `/api` |
42 | | -url like `https://<your-ip>:5173/api`, if you want to point your |
43 | | -frontend development to a backend server deployed elsewhere, change |
44 | | -the VITE_TOKEN_SERVER_URL to the full url of such server. |
45 | | - |
46 | | -# Install |
47 | | -Run `npm install` |
48 | | - |
49 | | -# Config |
50 | | -Copy `.env.example` to `.env.local` and add your local values |
51 | | -``` |
52 | | -VITE_TOKEN_SERVER_URL=/api |
53 | | -VITE_API_URL=https://demo-api.incodesmile.com |
54 | | -VITE_SDK_URL=https://sdk.incode.com/sdk/onBoarding-1.70.0.js |
55 | | -
|
56 | | -#Enable for 1:N |
57 | | -#VITE_CLIENT_ID=<your client id> |
58 | | -#VITE_API_KEY=<your api key> |
59 | | -``` |
60 | | - |
61 | | -# Run |
62 | | -Vite is configured to serve the project using https and and expose him self, |
63 | | -so you can easily test with your mobile phone on the local network. |
64 | | - |
65 | | -run `npm run dev` |
66 | | - |
67 | | -A new server will be exposed, the data will be in the terminal |
68 | | - |
69 | | -# Build |
70 | | -run `npm run build` |
71 | | - |
72 | | -A new build will be created in `/dist` you can serve that build everywhere |
73 | | -just remember to serve with https. |
74 | | - |
| 1 | +# Sample Moved to its own repo |
| 2 | +[authentication-javascript](https://github.com/Incode-Technologies-Example-Repos/authentication-javascript) |
0 commit comments