You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Send your site password in the `Authorization` header:
23
23
Authorization: Bearer YOUR_SITE_TOKEN
24
24
```
25
25
26
-
(`Bearer` means “here is the token”.) It must match `NUXT_SITE_TOKEN` exactly (at least 8 characters). With [Cloudflare Access](/configuration/cloudflare-access) enabled, browsers can also authenticate with a verified Access login.
26
+
(`Bearer` means “here is the token”.) In single-user mode it must match `NUXT_SITE_TOKEN` exactly (at least 8 characters). In OIDC multi-user mode, protected APIs require the browser's OIDC session and reject the site token. OIDC access and ID tokens remain on the server and are never stored by the browser.
Copy file name to clipboardExpand all lines: docs/configuration/cloudflare-access.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ description: Optional Zero Trust login for the Sink dashboard, while keeping sho
7
7
8
8
Cloudflare Access is **optional**. Use it when you want people to sign in to the dashboard with your company identity (Google, email OTP, SSO, and so on) instead of only sharing `NUXT_SITE_TOKEN`.
9
9
10
+
This integration applies to Sink's single-user mode. Configuring OIDC selects the separate multi-user mode, where protected APIs accept only OIDC sessions and ignore both Cloudflare Access identity and the site token.
11
+
10
12
Short links stay public either way. Access only affects who can open the dashboard and call the API.
|`NUXT_OIDC_SESSION_SECRET`| Runtime (secret) | Encrypted secret on Workers or Pages | Random value of at least 32 characters for signed sessions |
63
+
|`NUXT_OIDC_SESSION_TTL_SECONDS`| Runtime | Worker/Pages variable | Local session limit; defaults to `28800`|
64
+
|`DEPLOY_D1_DATABASE_ID`| Build | Workers Builds or Pages variables | D1 database ID (from the D1 detail page) |
65
+
|`DEPLOY_KV_NAMESPACE_ID`| Build | Workers Builds or Pages variables | KV namespace ID (from the KV detail page) |
66
+
67
+
### Authentication modes
68
+
69
+
Sink uses one authentication mode at a time:
70
+
71
+
- Without OIDC configuration, Sink remains a single-user application. The site token and Cloudflare Access use the shared `root` owner.
72
+
- Configuring OIDC enables multi-user mode. Browser and API access then require an OIDC session; the site token and Cloudflare Access no longer authenticate protected APIs.
73
+
- Setting only part of the required OIDC configuration fails closed. Configure the issuer, client ID, client secret, and session secret together.
74
+
75
+
### User ownership
76
+
77
+
In OIDC multi-user mode, each verified identity gets an isolated set of links, tags, and analytics. Sink uses the provider's stable subject identifier as the owner ID. In single-user mode, links created through the site token or Cloudflare Access and existing links upgraded from an earlier release belong to the shared `root` owner.
78
+
79
+
Short-link slugs remain globally unique because every public redirect shares the same hostname. A user therefore receives a conflict when another user already owns the requested slug, without gaining access to that link.
0 commit comments