# Authenticate Using SAML - OneLogin
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
1. Sign-in or sign-up for an OneLogin account.
2. Go to the administration page.
3. Select the **APPS** menu and click on the **Add Apps**.

4. Find "SAML Test Connector (SP)" for template of settings and select it.

5. Edit display name and icons for OneLogin dashboard as you want, and click **SAVE**.

6. Other tabs will appear, click **Configuration** and fill the registration form:
* RelayState: The base URL of your CodiMD, which is "the issuer". (Remove trailing slash.)
* ACS (Consumer) URL Validator: The callback URL of your CodiMD. (serverurl + /auth/saml/callback)
* ACS (Consumer) URL: Same as above
* Login URL: Login URL(SAML requester) of your CodiMD. (serverurl + /auth/saml)

7. Once you finished registration, click **SSO** and copy or download these two items:
* **X.509 Certificate**: Click **View Details** and **DOWNLOAD** or copy the content of certificate.
* **SAML 2.0 Endpoint (HTTP)**: Copy the URL.

8. In your CodiMD server, create IdP certificate file from the **X.509 Certificate**.
9. Add the **IdP URL** and the **Idp certificate file path** to environment variables:
```
CMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/******
CMD_SAML_IDPCERT=/path/to/idp_cert.pem
```
10. Try sign-in with SAML from your CodiMD sign-in button or OneLogin dashboard (like the screenshot below).

---
###### tags: `CodiMD` `Docs`