Skip to content

Commit f37cc50

Browse files
committed
improve
1 parent 4a1f136 commit f37cc50

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/content/docs/developers/chats.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This document explains how Ecency's chat experience works and how other Hive app
1616

1717
## Using Ecency-hosted chat endpoints
1818

19-
Other Hive apps can call Ecency's `/api/mattermost/*` routes directlyno Mattermost infrastructure required. Key points:
19+
Other Hive apps can call Ecency's `/api/mattermost/*` routes directly - **no Mattermost infrastructure required**. Key points:
2020

2121
- **Base URL**: Use the deployed Ecency web domain you target (e.g., `https://ecency.com/api/mattermost`). The same routes are available on staging instances for testing.
2222
- **Cookies required**: The routes rely on an httpOnly `mm_pat` cookie. When calling from a browser, use `credentials: "include"` so the cookie is stored for subsequent requests.
@@ -42,9 +42,9 @@ These are required only when running the Ecency API yourself; consumers of `ecen
4242

4343
### How Ecency access tokens are issued
4444

45-
Ecency always mints the same JWT `accessToken`/`refreshToken` pair regardless of the login provider. Hivesigner users obtain them via the OAuth callback, while other methods (Keychain, HiveAuth, or manual posting-key sign-in) go through the Ecency auth API, which returns the tokens after verifying a signed login challenge tied to the Hive posting authority. If your app already integrates Ecency login with those providers, reuse the returned tokens directly—they are identical to the ones required by the chat bootstrap endpoint.
45+
Ecency always mints the same JWT `accessToken`/`refreshToken` pair regardless of the login provider. Hivesigner users obtain them via the OAuth callback, while other methods (Keychain, HiveAuth, or manual posting-key sign-in) go through the Ecency auth API, which returns the tokens after verifying a signed login challenge tied to the Hive posting authority.
4646

47-
Otherwise, you can mint an `accessToken` yourself by signing the standard Hivesigner-style challenge locally with the user's posting private key during your app's login flow. Any app can create the payload, sign it, base64url-encode it, and submit it to Ecency's auth API as the `code` to receive the normal `accessToken`/`refreshToken` pair. A minimal example inspired by our production implementation:
47+
Otherwise, you can mint an `accessToken` yourself by signing the standard Hivesigner-style challenge locally with the user's posting private key during your app's login flow. Any app can create the payload, sign it, base64url-encode it, and use that as `accessToken`. A minimal example inspired by our production implementation:
4848

4949
```ts
5050
import { PrivateKey, cryptoUtils } from "@hiveio/dhive";

0 commit comments

Comments
 (0)