mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-10-23 05:11:57 +00:00
fix: improve clarity and formatting in SSO and templating documentation
This commit is contained in:
@@ -2,27 +2,28 @@
|
||||
|
||||
Libredesk supports external OpenID Connect providers (e.g., Google, Keycloak) for signing in users.
|
||||
|
||||
!!! Note
|
||||
!!! note
|
||||
User accounts must be created in Libredesk manually; signup is not supported.
|
||||
|
||||
## Generic Configuration Steps
|
||||
|
||||
Since each provider’s configuration might differ, consult your provider’s documentation for any additional or divergent settings.
|
||||
|
||||
1. **Provider Setup:**
|
||||
In your provider’s admin console, create a new OpenID Connect application/client. Retrieve the **Client ID** and **Client Secret**.
|
||||
In your provider’s admin console, create a new OpenID Connect application/client. Retrieve:
|
||||
- **Client ID**
|
||||
- **Client Secret**
|
||||
|
||||
2. **Libredesk Configuration:**
|
||||
In Libredesk, navigate to **Security > SSO** and click **New SSO**. Enter the following:
|
||||
- **Provider URL** (e.g., the URL of your OpenID provider)
|
||||
- **Client ID**
|
||||
- **Client Secret**
|
||||
- A descriptive **Name** for the connection
|
||||
In Libredesk, navigate to **Security > SSO** and click **New SSO**. Enter:
|
||||
- **Provider URL** (e.g., the URL of your OpenID provider)
|
||||
- **Client ID**
|
||||
- **Client Secret**
|
||||
- A descriptive **Name** for the connection
|
||||
|
||||
3. **Redirect URL:**
|
||||
After saving, copy the generated **Callback URL** from Libredesk and add it as a valid redirect URI in your provider’s client settings.
|
||||
|
||||
4. **Provider-Specific Adjustments:**
|
||||
Since each provider’s configuration might differ, please consult your provider’s documentation for any additional or divergent settings.
|
||||
|
||||
|
||||
## Provider Examples
|
||||
|
||||
### Keycloak
|
||||
@@ -30,23 +31,27 @@ Libredesk supports external OpenID Connect providers (e.g., Google, Keycloak) fo
|
||||
1. Log in to your Keycloak Admin Console.
|
||||
|
||||
2. In Keycloak, navigate to **Clients** and click **Create**:
|
||||
- Set **Client ID** (e.g., `libredesk-app`)
|
||||
- Set **Client Protocol** to `openid-connect`
|
||||
- Set **Root URL** and **Web Origins** to your app domain (e.g., `https://ticket.example.com`)
|
||||
- Uncheck everything besides "Standard flow" at "Authentication flow"
|
||||
- Save
|
||||
|
||||
- **Client ID** (e.g., `libredesk-app`)
|
||||
- **Client Protocol**: `openid-connect`
|
||||
- **Root URL** and **Web Origins**: your app domain (e.g., `https://ticket.example.com`)
|
||||
- Under **Authentication flow**, uncheck everything except **Standard flow**
|
||||
- Click **Save**
|
||||
|
||||
3. Go to the **Credentials** tab:
|
||||
- Ensure **Client Authenticator** is set to `Client Id and Secret`
|
||||
- Note down the generated **Client Secret**
|
||||
- Ensure **Client Authenticator** is set to `Client Id and Secret`
|
||||
- Note down the generated **Client Secret**
|
||||
|
||||
4. In Libredesk, go to **Security > SSO** and click **New SSO**:
|
||||
- Enter **Provider URL** (e.g., `https://keycloak.example.com/realms/yourrealm`)
|
||||
- Enter a descriptive **Name** (e.g., `Keycloak`)
|
||||
- Paste the **Client ID** and **Client Secret**
|
||||
- Save
|
||||
- After you save, click on the three dots and choose "Edit" to open the just created SSO.
|
||||
- Copy the generated **Callback URL** from Libredesk.
|
||||
- **Provider URL** (e.g., `https://keycloak.example.com/realms/yourrealm`)
|
||||
- **Name** (e.g., `Keycloak`)
|
||||
- **Client ID**
|
||||
- **Client Secret**
|
||||
- Click **Save**
|
||||
|
||||
6. Back in Keycloak, edit the client and add the **Callback URL** to **Valid Redirect URIs**:
|
||||
- e.g., `https://ticket.example.com/api/v1/oidc/1/finish`
|
||||
5. After saving, click on the three dots and choose **Edit** to open the newly SSO entry.
|
||||
|
||||
6. Copy the generated **Callback URL** from Libredesk.
|
||||
|
||||
7. Back in Keycloak, edit the client and add the **Callback URL** to **Valid Redirect URIs**:
|
||||
- e.g., `https://ticket.example.com/api/v1/oidc/1/finish`
|
||||
|
@@ -1,11 +1,12 @@
|
||||
# Templating
|
||||
|
||||
Templating in outgoing emails allows you to personalize content by embedding dynamic expressions like {{ .Recipient.FullName }}. These expressions reference fields from the conversation, contact, and recipient objects, making it easy to generate customized messages. This section documents all available template variables and provides a basic example to demonstrate their usage.
|
||||
Templating in outgoing emails allows you to personalize content by embedding dynamic expressions like `{{ .Recipient.FullName }}`. These expressions reference fields from the conversation, contact, and recipient objects.
|
||||
|
||||
## Email template expressions
|
||||
## Outgoing Email Template Expressions
|
||||
|
||||
There are several template expressions that can be used in the outgoing email template, They are written in the form `{{ .Recipient.FullName }}`.
|
||||
If you want to customize the look of outgoing emails, you can do so in the **Settings > Templates -> Outgoing Email Templates** section. This template will be used for all outgoing emails including replies to conversations, notifications, and other system-generated emails.
|
||||
|
||||
### Conversation fields
|
||||
|
||||
| Variable | Value |
|
||||
|---------------------------------|--------------------------------------------------------|
|
||||
@@ -31,9 +32,12 @@ There are several template expressions that can be used in the outgoing email te
|
||||
|
||||
|
||||
### Example outgoing email template
|
||||
|
||||
```html
|
||||
Dear {{ .Recipient.FirstName }}
|
||||
{{ template "content" . }}
|
||||
Best regards,
|
||||
```
|
||||
Here the `{{ template "content" . }}` is a placeholder for the content of the outgoing email. It will be replaced with the actual content of the email when it is sent. The `{{ .Recipient.FirstName }}` will be replaced with the first name of the recipient when the email is sent, this way you don't have to hardcode the name in the template. The same applies to the other variables.
|
||||
Here, the `{{ template "content" . }}` serves as a placeholder for the body of the outgoing email. It will be replaced with the actual email content at the time of sending.
|
||||
|
||||
Similarly, the `{{ .Recipient.FirstName }}` expression will dynamically insert the recipient's first name when the email is sent.
|
||||
|
Reference in New Issue
Block a user