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
3. Navigate to the Admin Portal example app within the cloned repo.
22
+
2. Navigate to the Admin Portal example app within the cloned repo.
28
23
```bash
29
24
$ cd python-flask-example-applications/python-flask-admin-portal-example
30
25
````
31
26
32
-
4. Create and source a Python virtual environment. You should then see `(env)` at the beginning of your command-line prompt.
27
+
3. Create and source a Python virtual environment. You should then see `(env)` at the beginning of your command-line prompt.
33
28
```bash
34
29
$ python3 -m venv env
35
30
$ source env/bin/activate
36
31
(env) $
37
32
```
38
33
39
-
5. Install the cloned app's dependencies.
34
+
4. Install the cloned app's dependencies.
40
35
```bash
41
36
(env) $ pip install -r requirements.txt
42
37
```
43
38
44
-
6. Obtain and make note of the following values. In the next step, these will be set as environment variables.
39
+
5. Obtain and make note of the following values. In the next step, these will be set as environment variables.
45
40
- Your [WorkOS API key](https://dashboard.workos.com/api-keys)
46
41
- Your `WORKOS_CLIENT_ID`, in the format `client_<random-alphanumeric-string>`, retrievable from WorkOS dashboard under "Configuration".
47
42
48
-
7. Ensure you're in the root directory forthe example app, `python-flask-admin-portal-example/`. Create a `.env` file to securely store the environment variables. Open this file with the Nano text editor. (This file is listedin this repo's `.gitignore` file, so your sensitive information will not be checked into version control.)
43
+
6. Ensure you're in the root directory forthe example app, `python-flask-admin-portal-example/`. Create a `.env` file to securely store the environment variables. Open this file with the Nano text editor. (This file is listedin this repo's `.gitignore` file, so your sensitive information will not be checked into version control.)
49
44
```bash
50
45
(env) $ touch .env
51
46
(env) $ nano .env
52
47
```
53
48
54
-
8. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
49
+
7. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
55
50
```bash
56
51
export WORKOS_API_KEY=<value found in step 6>
57
52
export WORKOS_CLIENT_ID=<value found in step 6>
58
53
```
59
54
60
55
To exit the Nano text editor, type `CTRL + x`. When prompted to "Save modified buffer", type `Y`, then press the `Enter` or `Return` key.
61
56
62
-
9. Source the environment variables so they are accessible to the operating system.
57
+
8. Source the environment variables so they are accessible to the operating system.
63
58
```bash
64
59
(env) $ source .env
65
60
```
@@ -70,13 +65,13 @@ An example Flask application demonstrating how to use the [WorkOS Python SDK](ht
70
65
(env) $ echo $WORKOS_CLIENT_ID
71
66
```
72
67
73
-
10. Update the Admin Portal Redirect Link in the "Configuration" page of your WorkOS Dashboard. The URL should be http://localhost:5000. If you are using Mac OS Monterey, set this to localhost:5001.
68
+
9. Update the Admin Portal Redirect Link in the "Configuration" page of your WorkOS Dashboard. The URL should be http://localhost:5000. If you are using Mac OS Monterey, set this to localhost:5001.
74
69
75
70
After an Admin Portal user creates an SSO connection using the Admin Portal, they need to be redirected to a webpage within your application (usually this webpage confirms successful creation of the connection). To configure which webpage this is, enter the webpage’s URL in the Configuration section of your WorkOS dashboard under the “Admin Portal Redirect Link” header. For production usage this URL must begin with HTTPS, but for development purposes the URL can begin with HTTP.
0 commit comments