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
* Add Get Directory route and refactor UI
* Update README to reflect webhooks secret env variable
* Update README to reflect that directory_id is no longer a required env variable
* Update README to remove reference to /users and /groups endpoints
Co-authored-by: Adam Wolfman <[email protected]>
Copy file name to clipboardExpand all lines: python-flask-directory-sync-example/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,8 @@ If you get stuck, please reach out to us at [email protected] so we can help.
54
54
55
55
6. Obtain and make note of the following values. In the next step, these will be set as environment variables.
56
56
- Your [WorkOS API key](https://dashboard.workos.com/api-keys)
57
-
- Your `DIRECTORY_ID`, in the format `directory_<random-alphanumeric-string>`, retrievable from the URL in the Directory Sync area of the WorkOS dashboard:
58
-

57
+
- Your `WEBHOOKS_SECRET`, retrievable from the URL in the WEBHOOKS area of the WorkOS dashboard. This is only required if you are utilizing the webhooks route of this application to receive and validate webhook events.
58
+
59
59
60
60
7. Ensure you're in the root directory for the example app, `python-flask-directory-sync-example/`. Create a `.env` file to securely store the environment variables. Open this file with the Nano text editor. (This file is listed in this repo's `.gitignore` file, so your sensitive information will not be checked into version control.)
61
61
```bash
@@ -66,7 +66,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
66
66
8. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
67
67
```bash
68
68
export WORKOS_API_KEY=<value found in step 6>
69
-
exportDIRECTORY_ID=<value found in step 6>
69
+
exportWEBHOOKS_SECRET=<value found in step 6>
70
70
```
71
71
72
72
To exit the Nano text editor, type`CTRL + x`. When prompted to "Save modified buffer", type`Y`, then press the `Enter` or `Return` key.
@@ -79,7 +79,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
79
79
You can ensure the environment variables were set correctly by running the following commands. The output should match the corresponding values.
80
80
```bash
81
81
(env) $ echo$WORKOS_API_KEY
82
-
(env) $ echo$DIRECTORY_ID
82
+
(env) $ echo$WEBHOOKS_SECRET
83
83
```
84
84
85
85
## Start the server
@@ -89,7 +89,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
89
89
flask run
90
90
```
91
91
92
-
2. Once the server is running, navigate to http://localhost:5000 to view the home page of the app where you can thenselectthe view for users or groups. Alternatively you could also view these directly using the following url's: http://localhost:5000/users and http://localhost:5000/groups.
92
+
2. Once the server is running, navigate to http://localhost:5000 to view the home page of the app where you can thenselectthe view for users or groups.
93
93
94
94
- The `/users` URL corresponds to the WorkOS API's [List Directory Users endpoint](https://workos.com/docs/reference/directory-sync/user/list)
95
95
- The `/groups` URL corresponds to the WorkOS API's [List Directory Groups endpoint](https://workos.com/docs/reference/directory-sync/group/list)
0 commit comments