Saleina CMS stores content in your GitLab repository. In order for this to work, you need to authenticate with your Git host. We have a few options for handling this.
For repositories stored on GitLab, the
gitlab backend allows CMS users to log in directly with their GitLab account. Note that all users must have push access to your content repository for this to work.
Client-Side Implicit Grant
With GitLab’s Implicit Grant, users can authenticate with GitLab directly from the client. To do this:
- Follow the GitLab docs to add your Saleina CMS instance as an OAuth application. For the Redirect URI, enter the address where you access Saleina CMS, for example,
https://www.example.com/admin/. For scope, select
GitLab will give you an Application ID. Copy this and enter it in your Saleina CMS
config.ymlfile, along with the following settings:
backend: name: gitlab repo: owner-name/repo-name # Path to your GitLab repository client_id: your-app-id # Application ID from your GitLab settings
GitLab will also provide you with a client secret. You should never store this in your repo or reveal it in the client.