@evup/auth 0.2.0 → 0.2.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 +6 -0
- package/README.md +3 -13
- package/package.json +1 -1
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.2.1 — 2026-11-26
|
|
6
|
+
|
|
7
|
+
### Other
|
|
8
|
+
|
|
9
|
+
- **auth:** keep the SDK README about using the SDK ([c458680](https://github.com/tamnt1707/evup-auth/commit/c4586801892e3c186f4aa2bec8bd14aaade87617))
|
|
10
|
+
|
|
5
11
|
## auth-v0.2.0 — 2026-11-26
|
|
6
12
|
|
|
7
13
|
### Features
|
package/README.md
CHANGED
|
@@ -7,10 +7,6 @@ An SDK that lets your app sign users in with **EvUp Account** (`auth.evup.cloud`
|
|
|
7
7
|
- **Web standards only** (`fetch`, `Request`/`Response`, WebCrypto, `Headers`): runs on Cloudflare Workers, Bun, Deno, Node >= 20. No `node:` imports in runtime code.
|
|
8
8
|
- **Thin adapters** for Hono, Astro, Next.js (App Router); other frameworks use the core with about 10 lines (see [Recipes for other frameworks](#recipes-for-other-frameworks)).
|
|
9
9
|
|
|
10
|
-
> AI assistants: this guide is served as Markdown at `<origin>/llms-full.txt` (index at `<origin>/llms.txt`), with `<origin>` your EvUp Account origin.
|
|
11
|
-
|
|
12
|
-
> Published on npm as `@evup/auth` (MIT). In this monorepo it is the workspace `@evup/auth` at `packages/auth`. The EvUp auth server does **not** use this SDK.
|
|
13
|
-
|
|
14
10
|
## Table of contents
|
|
15
11
|
|
|
16
12
|
1. [Installation](#installation)
|
|
@@ -551,7 +547,7 @@ Or `createEvupClient().signOut()` / `auth.signOut(request, { returnTo })`. The S
|
|
|
551
547
|
|
|
552
548
|
`returnTo` (a relative path) is only used when the EvUp sign-out page **cannot** be used (the IdP does not publish `end_session_endpoint`, or it cannot be reached); in that case the user goes to `returnTo` (default `/`). To send users back to a page after sign-out, register that URL as a *post-logout redirect URI* and set `postLogoutRedirectUri`.
|
|
553
549
|
|
|
554
|
-
### What EvUp's `/oauth2/end-session` accepts
|
|
550
|
+
### What EvUp's `/oauth2/end-session` accepts
|
|
555
551
|
|
|
556
552
|
- **Parameters** (GET or POST form): `id_token_hint`, `client_id`, `post_logout_redirect_uri`, `state`.
|
|
557
553
|
- **`id_token_hint`**: an id_token signed by EvUp itself (signature checked through JWKS; `exp` is **not** checked, so an expired id_token still works), correct `iss`, `aud` containing the client, with `sid` and `sub` claims. If it is valid and matches the current browser session, EvUp **ends the session immediately** without asking anything.
|
|
@@ -559,7 +555,7 @@ Or `createEvupClient().signOut()` / `auth.signOut(request, { returnTo })`. The S
|
|
|
559
555
|
- **`client_id`**: optional when there is a hint (by default derived from the hint's `aud`/`azp`); it must be an existing, non-disabled client with **`enable_end_session` turned on**, otherwise EvUp returns an `invalid_client` error ("The client is not allowed to initiate logout").
|
|
560
556
|
- **`post_logout_redirect_uri`**: must match, **character for character**, an entry in the app's *post-sign-out redirect URLs* (the sign-in redirect list is not used). EvUp only redirects on a match; if it does not match, the user is still signed out but stops at EvUp's "Logged out. The requested post-logout redirect was not registered." page. Only `client_id` needs to accompany it; `http://` is only allowed for localhost.
|
|
561
557
|
- **`state`**: if sent, EvUp appends it to `post_logout_redirect_uri` when redirecting. The SDK does not use this `state`.
|
|
562
|
-
- **Back-channel logout** (`backchannel_logout_uri`): SDK
|
|
558
|
+
- **Back-channel logout** (`backchannel_logout_uri`): the SDK has no receiver yet. The session in the app ends on the next refresh (when EvUp returns `invalid_grant`), that is, after about 1 hour at most.
|
|
563
559
|
|
|
564
560
|
## MCP / API resource server
|
|
565
561
|
|
|
@@ -754,7 +750,7 @@ Errors in the callback never leak details to the user: they see a "Sign-in faile
|
|
|
754
750
|
|
|
755
751
|
## Local development with a local IdP
|
|
756
752
|
|
|
757
|
-
|
|
753
|
+
If you run an EvUp Account instance locally (for example on `http://localhost:4400`), point the SDK at it:
|
|
758
754
|
|
|
759
755
|
```ts
|
|
760
756
|
createEvupAuth({
|
|
@@ -769,12 +765,6 @@ createEvupAuth({
|
|
|
769
765
|
- Register in the app: redirect URI `http://localhost:3000/auth/callback`, post-logout `http://localhost:3000/`. Use a separate dev app instead of the production app.
|
|
770
766
|
- Dev resource: add `http://localhost:8787/mcp` as a separate entry in **API resources**.
|
|
771
767
|
|
|
772
|
-
Run the package's tests: `npm test -w @evup/auth` (completely offline). The test that reads the real discovery of `auth.evup.cloud` (a single public `GET`) only runs when `EVUP_LIVE_TEST=1` is set.
|
|
773
|
-
|
|
774
|
-
## Releasing
|
|
775
|
-
|
|
776
|
-
The package has its own version and is released from the repo root with `npm run release:sdk` (preview: `-- --dry-run`). The tag `auth-vX.Y.Z` triggers `.github/workflows/release-sdk.yml`: build, test, `npm publish`, then a GitHub Release from the package's `CHANGELOG.md`. Publishing uses npm Trusted Publishing (OIDC): on npmjs.com the package `@evup/auth` trusts this repository and the `release-sdk.yml` workflow, so no `NPM_TOKEN` is stored (fallback: an `NPM_TOKEN` secret via `NODE_AUTH_TOKEN`). The workflow skips `npm publish` when the version is already on npm (for example the first version, published by hand) and still creates the GitHub Release. `--provenance` is off while the repository is private.
|
|
777
|
-
|
|
778
768
|
## FAQ
|
|
779
769
|
|
|
780
770
|
**Why are users signed out after about 1 hour?** A session without a refresh token (you removed `offline_access` from `scopes`) expires with the access token. Keep `offline_access` (the default).
|
package/package.json
CHANGED