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: README.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,11 +59,13 @@ OTP Provider -> Authenticates user via email-based OTP and returns identity asse
59
59
### Steps
60
60
61
61
1. Create `.env` from `.env.example` and update all the values
62
-
2. Run `yarn` to install all the dependencies
63
-
3. Run `yarn dev` to start a local server
64
-
4. Run `yarn build` to create a javascript bundle for production deployment
65
-
5. Run `yarn start` to run the javascript bundle
66
-
6. Run `yarn tailwind` to compile the css (will hot reload)
62
+
2. Generate a local `JWKS={}` env variable for the `.env` file using the the script in the [./jwks-generator](./jwks-generator/) folder.
63
+
3. Run `yarn` to install all the dependencies
64
+
4. Run `yarn tailwind` on first build of project otherwise yarn build will fail due to missing css files.
65
+
5. Run `yarn dev` to start a local server
66
+
6. Run `yarn build` to create a javascript bundle for production deployment
67
+
7. Run `yarn start` to run the javascript bundle
68
+
8. Run `yarn tailwind` to compile the css (will hot reload)
67
69
68
70
## AWS Simple Email Service
69
71
@@ -84,6 +86,16 @@ OTP Provider -> Authenticates user via email-based OTP and returns identity asse
84
86
85
87
The app runs locally using tsup to compile the server and client files into the `build` directory. To recompile the css on the fly, run `yarn tailwind` in another terminal.
86
88
89
+
## Local Unit tests
90
+
91
+
The local tests are built and run using:
92
+
93
+
`make test_db`
94
+
95
+
and
96
+
97
+
`make unit_test`
98
+
87
99
## Test Data
88
100
89
101
- Given the application and database are up and database migration is successfully complete, run below SQL to add a client for testing purposes.
@@ -141,7 +153,7 @@ End to end testing is done with playwright. As prerequisite the end-to-end tests
This javascript snippet allows a user to generate the JWKS json environment variable.
2
+
3
+
Run two commands
4
+
5
+
`yarn install`
6
+
7
+
and
8
+
9
+
`node jwks-generator.js `
10
+
11
+
To generate the JWKS env variable for a local otp server. This environment variable is not wrapped in quotes in the .en file. **Note: the local server requires the private keys to run**
0 commit comments