|
1 | | -<p> |
2 | | - Welcome to your Staffbase SSO plugin server. Please follow the following |
3 | | - instructions to get started with your Plugin Application. |
4 | | -</p> |
| 1 | +<p>Welcome to your Staffbase SSO plugin server. Please follow the following instructions |
| 2 | +to get started with your Plugin Application.</p> |
5 | 3 | <h2>Prerequisites</h2> |
6 | | -<p> |
7 | | - In order to get connected with the Staffbase SSO interface, you need a Valid |
8 | | - Secret and an Audience ID. |
9 | | -</p> |
10 | | -<p> |
11 | | - If you are here, you probably have a secret and audience ID registered with |
12 | | - Staffbase. If you are not sure about it or you need more information about |
13 | | - Staffbase SSO, feel free to contact the Customer Success team at Staffbase. |
14 | | -</p> |
| 4 | +<p>In order to get connected with the Staffbase SSO interface, you need a Valid Secret and an Audience ID.</p> |
| 5 | +<p>If you are here, you probably have a secret and audience ID registered with Staffbase. If you are not sure about it or you need more information about Staffbase SSO, feel free to contact the Customer Success team at Staffbase.</p> |
15 | 6 | <h2>Configuration</h2> |
16 | | -<p> |
17 | | - After the scaffolding is complete, you need to provide some values for |
18 | | - configuring your plugin server. The following values need to be configured. |
19 | | -</p> |
| 7 | +<p>After the scaffolding is complete, you need to provide some values for configuring your |
| 8 | +plugin server. The following values need to be configured.</p> |
20 | 9 | <ul> |
21 | | - <li>Plugin Secret</li> |
22 | | - <li>Plugin Audience</li> |
| 10 | +<li>Plugin Secret</li> |
| 11 | +<li>Plugin Audience</li> |
23 | 12 | </ul> |
24 | | -<p> |
25 | | - You can either specify these values in environment variables or directly |
26 | | - passing the values in the <code>app.js</code> file where the middleware is |
27 | | - initialized. |
28 | | -</p> |
29 | | -<p> |
30 | | - To configure values in <code>app.js</code> file, change the following lines: |
31 | | -</p> |
| 13 | +<p>You can either specify these values in environment variables or directly passing |
| 14 | +the values in the <code>app.js</code> file where the middleware is initialized.</p> |
| 15 | +<p>To configure values in <code>app.js</code> file, change the following lines:</p> |
32 | 16 | <p>app.js</p> |
33 | 17 | <pre><code class="language-javascript">12 ... |
34 | 18 | 13 ... |
35 | 19 | 14 const key = null; |
36 | 20 | 15 const pluginID = null; |
37 | 21 | 16 ... |
38 | 22 | </code></pre> |
39 | | -<p> |
40 | | - You can also specify these values using environment variables. Refer to the |
41 | | - table to see which environment variables can be used. |
42 | | -</p> |
| 23 | +<p>You can also specify these values using environment variables. |
| 24 | +Refer to the table to see which environment variables can be used.</p> |
43 | 25 | <table> |
44 | | - <thead> |
45 | | - <tr> |
46 | | - <th style="text-align: left"><em>Value</em></th> |
47 | | - <th style="text-align: center"><em>Environment Variable</em></th> |
48 | | - </tr> |
49 | | - </thead> |
50 | | - <tbody> |
51 | | - <tr> |
52 | | - <td style="text-align: left">Secret</td> |
53 | | - <td style="text-align: center">STAFFBASE_SSO_SECRET</td> |
54 | | - </tr> |
55 | | - <tr> |
56 | | - <td style="text-align: left">Audience</td> |
57 | | - <td style="text-align: center">STAFFBASE_SSO_AUDIENCE</td> |
58 | | - </tr> |
59 | | - <tr> |
60 | | - <td style="text-align: left">Server Port</td> |
61 | | - <td style="text-align: center">PORT</td> |
62 | | - </tr> |
63 | | - </tbody> |
| 26 | +<thead> |
| 27 | +<tr> |
| 28 | +<th style="text-align:left"><em>Value</em></th> |
| 29 | +<th style="text-align:center"><em>Environment Variable</em></th> |
| 30 | +</tr> |
| 31 | +</thead> |
| 32 | +<tbody> |
| 33 | +<tr> |
| 34 | +<td style="text-align:left">Secret</td> |
| 35 | +<td style="text-align:center">STAFFBASE_SSO_SECRET</td> |
| 36 | +</tr> |
| 37 | +<tr> |
| 38 | +<td style="text-align:left">Audience</td> |
| 39 | +<td style="text-align:center">STAFFBASE_SSO_AUDIENCE</td> |
| 40 | +</tr> |
| 41 | +<tr> |
| 42 | +<td style="text-align:left">Server Port</td> |
| 43 | +<td style="text-align:center">PORT</td> |
| 44 | +</tr> |
| 45 | +</tbody> |
64 | 46 | </table> |
65 | 47 | <h2>Running the server</h2> |
66 | | -<p> |
67 | | - <em>create-staffbase-plugin</em> installs the project dependencies for you. |
68 | | - After configurations is done, the only thing you need to do is navigate to the |
69 | | - folder where your app was generated and start the express server. |
70 | | -</p> |
| 48 | +<p><em>create-staffbase-plugin</em> installs the project dependencies for you. |
| 49 | +After configurations is done, the only thing you need to do is navigate to the |
| 50 | +folder where your app was generated and start the express server.</p> |
71 | 51 | <pre><code class="language-bash">$ cd [path of generated app] |
72 | 52 | $ npm start |
73 | 53 | </code></pre> |
74 | 54 | <h2>Further Reading</h2> |
75 | | -<p> |
76 | | - For getting more information about Staffbase SSO, please check out the |
77 | | - following links: |
78 | | -</p> |
| 55 | +<p>For getting more information about Staffbase SSO, please check out the following links:</p> |
79 | 56 | <ul> |
80 | | - <li> |
81 | | - <a href="https://developers.staffbase.com/concepts/customplugin-overview/" |
82 | | - >Developer Portal: Custom Plugins</a |
83 | | - > |
84 | | - </li> |
85 | | - <li> |
86 | | - <a |
87 | | - href="https://github.com/Staffbase/plugins-sdk-nodejs/blob/main/README.MD" |
88 | | - >Staffbase Plugins SDK for Node.js</a |
89 | | - > |
90 | | - </li> |
| 57 | +<li><a href="https://developers.staffbase.com/concepts/customplugin-overview/">Developer Portal: Custom Plugins</a></li> |
| 58 | +<li><a href="https://github.com/Staffbase/plugins-sdk-nodejs/blob/main/README.MD">Staffbase Plugins SDK for Node.js</a></li> |
91 | 59 | </ul> |
0 commit comments