Skip to content

Commit 1fd9548

Browse files
committed
[SDK-165]: Updated READMEs to have consistent descriptions of settings, added section on how to use the .env.example files
1 parent cb0de0a commit 1fd9548

File tree

3 files changed

+25
-40
lines changed

3 files changed

+25
-40
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,15 @@ import "yoti_python_sdk"
9191

9292
After creating your application on the [Yoti Dashboard](https://www.yoti.com/dashboard/), you need to download the `.PEM` key and save it *outside* the repo (keep it private).
9393

94-
The following variables are then required for the SDK to work:
94+
The following variables are then required for the SDK to work, these are found under the different tabs of your Yoti application's settings page ([Yoti Dashboard](https://www.yoti.com/dashboard/)):
9595

96-
* `YOTI_CLIENT_SDK_ID` - is the SDK identifier generated by Yoti Dashboard in the Key tab when you create your app. Note this is not your Application Identifier which is needed by your client-side code
97-
* `YOTI_KEY_FILE_PATH` - is the path to the application pem file. It can be downloaded only once from the Keys tab in your Yoti Dashboard. (e.g. /home/user/.ssh/access-security.pem)
96+
* **`YOTI_APPLICATION_ID`** - This is used to configure the [Yoti Login Button](https://www.yoti.com/developers/documentation/#2-front-end-integration).
97+
* **`YOTI_CLIENT_SDK_ID`** - is the SDK identifier generated by Yoti Dashboard in the Key tab when you create your app. Note this is not your Application Identifier which is needed by your client-side code
98+
* **`YOTI_KEY_FILE_PATH`** - is the path to the application .pem file, we recommend keeping your .pem file outside of your repository. It can be downloaded only once from the Keys tab in your Yoti Dashboard. (e.g. /home/user/.ssh/access-security.pem)
9899

99-
Please do not open the pem file as this might corrupt the key and you will need to create a new application.
100+
**Please do not open the pem file** as this might corrupt the key and you will need to create a new application.
100101

101-
The following env variables are additionally used to configure your backend:
102-
* `YOTI_APPLICATION_ID` - found on the Integrations settings page, used to configure the [Yoti Login Button](https://www.yoti.com/developers/#login-button-setup).
103-
104-
Keeping your settings and access keys outside your repository is highly recommended.
102+
One way to configure these environment variables is to use an .env file. There are `.env.example` files supplied in the [Django](/examples/yoti_example_django/yoti_example/.env.example) and [Flask](/examples/yoti_example_flask/.env.example) example projects, which you can rename to `.env` and enter your settings into this file.
105103

106104
### Example
107105

plugins/django_yoti/README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,17 @@ def some_view(request):
5050
return render(request, 'index.html', yoti_context)
5151
```
5252

53-
* And then use the following settings to configure the plugin:
53+
The following variables are then required for the plugin to work, these are found under the different tabs of your Yoti application's settings page ([Yoti Dashboard](https://www.yoti.com/dashboard/)):
5454

55+
* **`YOTI_APPLICATION_ID`** - This is used to configure the [Yoti Login Button](https://www.yoti.com/developers/documentation/#2-front-end-integration).
56+
* **`YOTI_CLIENT_SDK_ID`** - is the SDK identifier generated by Yoti Dashboard in the Key tab when you create your app. Note this is not your Application Identifier which is needed by your client-side code
57+
* **`YOTI_KEY_FILE_PATH`** - is the path to the application .pem file, we recommend keeping your .pem file outside of your repository. It can be downloaded only once from the Keys tab in your Yoti Dashboard. (e.g. /home/user/.ssh/access-security.pem)
5558

59+
**Please do not open the pem file** as this might corrupt the key and you will need to create a new application.
60+
61+
One way to configure these environment variables is to use an .env file. There are `.env.example` files supplied in the [Django](/examples/yoti_example_django/yoti_example/.env.example) and [Flask](/examples/yoti_example_flask/.env.example) example projects, which you can rename to `.env` and enter your settings into this file.
62+
63+
Alternatively you could define these settings in the `settings.py` file like this:
5664
```python
5765
# your_django_project/settings.py
5866

@@ -65,21 +73,6 @@ YOTI = {
6573
...
6674
}
6775
```
68-
* **`YOTI_APPLICATION_ID`** - **required**, *can be also set by env variable with the same name*<br>
69-
Your Yoti application's ID, found under the `INTEGRATIONS` tab of your
70-
Yoti application's settings page ([Yoti Dashboard](https://www.yoti.com/dashboard/)).<br>
71-
It is used to configure the [Yoti Login Button](https://www.yoti.com/developers/#login-button-setup).<br>
72-
Example: `ca84f68b-1b48-458b-96bf-963868edc8b6`
73-
74-
* **`YOTI_CLIENT_SDK_ID`** - **required**, *can be also set by env variable with the same name*<br>
75-
Your Yoti application's SDK ID, found under the `INTEGRATIONS` tab of your
76-
Yoti application's settings page ([Yoti Dashboard](https://www.yoti.com/dashboard/)).<br>
77-
Example: `39aef70a-89d6-4644-a687-b3e891613da6`
78-
79-
* **`YOTI_KEY_FILE_PATH`** - **required**, *can be also set by env variable with the same name*<br>
80-
The full path to your private key downloaded from your Yoti application's
81-
settings page under the `KEYS` tab ([Yoti Dashboard](https://www.yoti.com/dashboard/)).<br>
82-
Example: `/home/user/.ssh/access-security.pem`
8376

8477
### Endpoints configuration ###
8578

plugins/flask_yoti/README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,17 @@ app.register_blueprint(flask_yoti_blueprint, url_prefix='/yoti')
1717
```
1818
*Don't forget to set an `app.secret_key` to be able to use `sessions`*
1919

20-
* And then use the following settings to configure the plugin:
20+
The following variables are then required for the plugin to work, these are found under the different tabs of your Yoti application's settings page ([Yoti Dashboard](https://www.yoti.com/dashboard/)):
2121

22+
* **`YOTI_APPLICATION_ID`** - This is used to configure the [Yoti Login Button](https://www.yoti.com/developers/documentation/#2-front-end-integration).
23+
* **`YOTI_CLIENT_SDK_ID`** - is the SDK identifier generated by Yoti Dashboard in the Key tab when you create your app. Note this is not your Application Identifier which is needed by your client-side code
24+
* **`YOTI_KEY_FILE_PATH`** - is the path to the application .pem file, we recommend keeping your .pem file outside of your repository. It can be downloaded only once from the Keys tab in your Yoti Dashboard. (e.g. /home/user/.ssh/access-security.pem)
25+
26+
**Please do not open the pem file** as this might corrupt the key and you will need to create a new application.
27+
28+
One way to configure these environment variables is to use an .env file. There are `.env.example` files supplied in the [Django](/examples/yoti_example_django/yoti_example/.env.example) and [Flask](/examples/yoti_example_flask/.env.example) example projects, which you can rename to `.env` and enter your settings into this file.
29+
30+
Alternatively you could define these settings in the `app.py` file like this:
2231

2332
```python
2433
# your_flask_project/app.py
@@ -32,21 +41,6 @@ app.config.update({
3241
...
3342
})
3443
```
35-
* **`YOTI_APPLICATION_ID`** - **required**, *can be also set by env variable with the same name*<br>
36-
Your Yoti application's ID, found under the `INTEGRATIONS` tab of your
37-
Yoti application's settings page ([Yoti Dashboard](https://www.yoti.com/dashboard/)).<br>
38-
It is used to configure the [Yoti Login Button](https://www.yoti.com/developers/#login-button-setup).<br>
39-
Example: `ca84f68b-1b48-458b-96bf-963868edc8b6`
40-
41-
* **`YOTI_CLIENT_SDK_ID`** - **required**, *can be also set by env variable with the same name*<br>
42-
Your Yoti application's SDK ID, found under the `INTEGRATIONS` tab of your
43-
Yoti application's settings page ([Yoti Dashboard](https://www.yoti.com/dashboard/)).<br>
44-
Example: `39aef70a-89d6-4644-a687-b3e891613da6`
45-
46-
* **`YOTI_KEY_FILE_PATH`** - **required**, *can be also set by env variable with the same name*<br>
47-
The full path to your private key downloaded from your Yoti application's
48-
settings page under the `KEYS` tab ([Yoti Dashboard](https://www.yoti.com/dashboard/)).<br>
49-
Example: `/home/user/.ssh/access-security.pem`
5044

5145
### Endpoints configuration ###
5246

0 commit comments

Comments
 (0)