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: demo/email/README.md
+18-3
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,23 @@
1
1
This is a demo of the React Native Juicebox SDK.
2
2
3
-
# Running the Demo
3
+
# About the demo
4
+
5
+
The e-mail demo intends to demonstrate a Juicebox onboarding flow that:
6
+
1. Generates Juicebox authentication tokens on a server external to the application
7
+
2. Authenticates with that server through a "magic" link sent to the user's email
8
+
9
+
The example server can be found in the [server](server) directory.
4
10
5
-
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
11
+
To perform authentication and achieve these goals, onboarding typically looks something like:
12
+
1. Request the user's e-mail
13
+
2. Send the user's e-mail to the server (`POST /email-token`) to send a confirmation e-mail
14
+
3. Receive a single-use token from the user's e-mail
15
+
4. Use the single-use token to authenticate with the server (`GET /auth-token`) to validate the user's e-mail and receive a server token
16
+
5. Request the user's PIN
17
+
6. Use the server token to request Juicebox tokens (`POST /juicebox-token`) for the configured realms
18
+
7. Perform the appropriate Juicebox operation using the SDK (register or recover)
19
+
20
+
# Running the Demo
6
21
7
22
## Step 1: Start the Metro Server
8
23
@@ -46,7 +61,7 @@ yarn ios
46
61
47
62
If everything is set up _correctly_, you should see the demo running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
48
63
49
-
Yu can also run it directly from within Android Studio and Xcode respectively by opening the respective projects.
64
+
You can also run it directly from within Android Studio and Xcode respectively by opening the respective projects.
0 commit comments