diff --git a/docs/docs/sso.md b/docs/docs/sso.md index a6d96ae5..4458639a 100644 --- a/docs/docs/sso.md +++ b/docs/docs/sso.md @@ -1,31 +1,52 @@ # Setting up SSO -You can use external OpenID Providers like Google, Keycloak, ... to allow your users to sign into Libredesk. +Libredesk supports external OpenID Connect providers (e.g., Google, Keycloak) for signing in users. -!!! Keep in mind - You still have to create the user accounts in Libredesk, they do not get created automatically. +!!! Note + User accounts must be created in Libredesk manually; signup is not supported. -## Google +## Generic Configuration Steps -There is currently no documentation for it. Feel free to change that! +1. **Provider Setup:** + In your provider’s admin console, create a new OpenID Connect application/client. Retrieve the **Client ID** and **Client Secret**. -## Keycloak +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 -1. Go to your Keycloak Admin Console and log in. -2. Open your Libredesk Dashboard and navigat to "Security" > "SSO". -3. Click the "New SSO" button to add a new SSO. -4. Navigate to "Clients" on the left menu. -5. Click "Create" to add a new client. -6. Enter a Client ID (e.g. `libredesk-app`) and select OpenID Connect as the protocol. -7. Set the "Root URL" (e.g. `https://ticket.example.com`). -8. Set the "Web origins" (e.g. `https://ticket.example.com`). -9. Uncheck everything besides "Standard flow" at "Authentication flow" and save your changes. -10. Go to the "Credentials" tab and change the "Client Authenticator" to `Client Id and Secret`. -11. Enter `https://keycloak.example.com/realms/yourrealm` as the "Provider URL" and choose a name (e.g. `Keycloak`) in Libredesk. -12. Copy and paste the Client ID and secret into Libredesk and save. -13. Afer you save, click on the three dots and choose "Edit" to open the just created SSO. -14. Copy the "Callback URL" and paste it into the "Valid redirect URIs" field inside Keycloak (e.g. `https://ticket.example.com/api/v1/oidc/1/finish`). +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. -## Other providers +4. **Provider-Specific Adjustments:** + Since each provider’s configuration might differ, please consult your provider’s documentation for any additional or divergent settings. -There is currently no documentation for it. Feel free to change that! +## Provider Examples + +### Keycloak + +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 + +3. Go to the **Credentials** tab: + - 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. + +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` diff --git a/docs/docs/variables.md b/docs/docs/templating.md similarity index 53% rename from docs/docs/variables.md rename to docs/docs/templating.md index 25ac2911..7ca42ce4 100644 --- a/docs/docs/variables.md +++ b/docs/docs/templating.md @@ -1,21 +1,19 @@ -# Avaiable variables +# Templating -!!! warning "Outgoing email template required" +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. - The current version requires that the used outgoing email template contains `{{ template "content" . }}` +## Email template expressions -!!! bug "Email variables" +There are several template expressions that can be used in the outgoing email template, They are written in the form `{{ .Recipient.FullName }}`. - All email variables currently return `{ true true}` instead of `` which you might expect. -## Conversation Variables | Variable | Value | |---------------------------------|--------------------------------------------------------| | {{ .Conversation.ReferenceNumber }} | The unique reference number of the conversation | -| {{ .Conversation.Subject }} | The subject of the conversation | +| {{ .Conversation.Subject }} | The subject of the conversation | | {{ .Conversation.UUID }} | The unique identifier of the conversation | -## Contact Variables +### Contact fields | Variable | Value | |------------------------------|------------------------------------| | {{ .Contact.FirstName }} | First name of the contact/customer | @@ -23,10 +21,19 @@ | {{ .Contact.FullName }} | Full name of the contact/customer | | {{ .Contact.Email }} | Email address of the contact/customer | -## Recipient Variables +### Recipient Variables | Variable | Value | |--------------------------------|-----------------------------------| | {{ .Recipient.FirstName }} | First name of the recipient | | {{ .Recipient.LastName }} | Last name of the recipient | | {{ .Recipient.FullName }} | Full name of the recipient | | {{ .Recipient.Email }} | Email address of the recipient | + + +### 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. diff --git a/docs/docs/translations.md b/docs/docs/translations.md new file mode 100644 index 00000000..3c896f0a --- /dev/null +++ b/docs/docs/translations.md @@ -0,0 +1,3 @@ +# Translations / Internationalization + +You can help translate LibreDesk into different languages by contributing here: [LibreDesk Translation Project](https://crowdin.com/project/libredesk) \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index e8e0c551..530f4455 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -31,7 +31,8 @@ nav: - Getting Started: - Installation: installation.md - Upgrade: upgrade.md - - Variables: variables.md - - Advanced Configuration: + - Templating: templating.md - SSO: sso.md - - Developer Setup: developer-setup.md + - Contributors: + - Developer setup: developer-setup.md + - Translations: translations.md