@evup/auth 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Auto-generated by `npm run release:sdk` from Conventional Commits.
4
4
 
5
+ ## auth-v0.3.1 — 2026-11-27
6
+
7
+ ### Features
8
+
9
+ - **m2m:** scopes declared per API resource ([317527c](https://github.com/tamnt1707/evup-auth/commit/317527cac17521baf833a0b59a2b61ed8c34b8f0))
10
+
5
11
  ## auth-v0.3.0 — 2026-11-26
6
12
 
7
13
  ### Features
package/README.md CHANGED
@@ -672,7 +672,7 @@ An MCP client calls `POST /mcp` without a token, gets a `401` with `WWW-Authenti
672
672
 
673
673
  Use this when a **server** has to call an API with no signed-in user: a cron job, a queue consumer, a backend calling another app's API. The server exchanges its own `client_id` and `client_secret` for a short-lived access token (OAuth `client_credentials`, RFC 6749 section 4.4). For work on behalf of a user, use the user's session token instead (see the FAQ).
674
674
 
675
- **1. Admin setup.** An EvUp admin opens the *calling* app's detail page (it must be a *Web app (server)*, a client with a secret), turns on **Machine-to-machine → Allow client credentials**, then **Add API**: pick an API resource of any app and the scopes the app may use there (`api:read`, `api:write`; their meaning is up to each API, and the token's `aud` pins which API). The API itself must be registered first in the **API resources** card of the app that serves it. Switching it off keeps the list, so switching on again restores it.
675
+ **1. Admin setup.** An EvUp admin opens the *calling* app's detail page (it must be a *Web app (server)*, a client with a secret), turns on **Machine-to-machine → Allow client credentials**, then **Add API**: pick an API resource of any app and the scopes the app may use there. Scopes are declared by each API, in the **API resources** card of the app that serves it (*Machine-to-machine scopes*, for example `payments:read`, `payments:write`, `payments:refund`); an API that declares nothing uses `api:read` / `api:write` by default. Their meaning is up to each API, and the token's `aud` pins which API. Asking for a scope the API does not declare, or one not granted to your app there, returns `invalid_scope`. The API itself must be registered first in the **API resources** card of the app that serves it. Switching it off keeps the list, so switching on again restores it.
676
676
 
677
677
  **2. The calling side** (`createEvupClientCredentials`):
678
678
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evup/auth",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "SDK for apps and resource servers that sign in with EvUp Account (OIDC authorization code + PKCE, RFC 9728 resource servers).",
5
5
  "license": "MIT",
6
6
  "repository": {