memos/web/src/utils
boojack d1cef7a9ab feat(auth): add private instance mode derived from instance_url
Run the instance in private mode when instance_url is not configured: the API rejects anonymous requests except the auth-bootstrap set (sign-in, token refresh, instance profile/settings, SSO providers, share-link access) plus first-run user creation, and the web UI redirects anonymous visitors to /auth instead of /explore. Setting instance_url keeps the current public behavior. Access tokens and personal access tokens are never gated.

Enforcement lives in a shared Authorizer used by both the Connect interceptor and the gRPC-gateway middleware; the file server applies the same rule to public-memo attachments and avatars. Also merges the duplicated Authenticate/AuthenticateToUser token dispatch behind resolveBearer, dedups the AuthContext unauthenticated state, extracts the redirect decision into a pure shouldGatePrivateInstance helper, and prints the access mode at startup.
2026-07-05 22:48:00 +08:00
..
rehype-plugins feat: add outline navigation to memo detail sidebar (#5771) 2026-03-24 00:20:40 +08:00
remark-plugins feat(editor): recognize and style @mentions in the rich editor 2026-06-26 09:28:41 +08:00
attachment.ts feat(attachments): add Live Photo and Motion Photo support (#5810) 2026-04-06 10:47:01 +08:00
auth-redirect.ts feat(auth): add private instance mode derived from instance_url 2026-07-05 22:48:00 +08:00
format.ts feat(editor): add voice note recording to the memo composer (#5801) 2026-04-01 09:36:33 +08:00
i18n.ts feat(i18n): add searchable locale picker 2026-06-09 09:33:17 +08:00
markdown-manipulation.ts feat: add outline navigation to memo detail sidebar (#5771) 2026-03-24 00:20:40 +08:00
markdown-task-actions.ts feat(memo): add task list quick actions (#5983) 2026-05-27 09:13:55 +08:00
media-item.ts fix: unify live photo previews around LIVE badge playback 2026-04-06 11:56:58 +08:00
memo.ts refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
mention-grammar.ts refactor: rebuild the editor on CodeMirror as decorated source 2026-06-28 22:59:14 +08:00
oauth.ts feat(auth): add SSO user identity linkage (#5883) 2026-04-23 08:51:45 +08:00
redirect-safety.ts feat(auth): add private instance mode derived from instance_url 2026-07-05 22:48:00 +08:00
tag-grammar.ts refactor: rebuild the editor on CodeMirror as decorated source 2026-06-28 22:59:14 +08:00
theme.ts chore(theme): rebalance dark palette for readability 2026-05-02 09:11:46 +08:00
user.ts refactor: migrate HOST roles to ADMIN 2026-01-20 23:38:30 +08:00
uuid.ts feat: implement memo chat frontend (#1938) 2023-07-14 13:09:21 +08:00