feat (PUT-1016 & PUT-1020)#3164
Merged
Merged
Conversation
temp account preservation on forced relogin hosted asset cookies to v2 token too
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates auth/session flows to preserve temporary accounts across forced re-login and migrates hosted-asset cookies to v2 tokens (including a stable auth_id claim), while also standardizing comment section dividers per AGENTS.md.
Changes:
- Add
auth_id-based reauth enforcement and temp-user preservation logic during login/signup flows, including per-IP rate limiting forauth_idpaths. - Introduce v2 hosted-asset cookie names and extend hosted-asset tokens to carry
auth_id, plus verification hardening around revoked session binding. - Replace box-drawing section dividers with ASCII
--across many backend modules and document the convention inAGENTS.md.
Reviewed changes
Copilot reviewed 75 out of 75 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/gui/src/UI/UIWindowManageSessions.js | Stop sending cookies on revoke-session; rely on bearer auth + anti-CSRF token. |
| src/backend/types.ts | Comment divider style updates. |
| src/backend/stores/user/UserStore.ts | Comment divider style updates. |
| src/backend/stores/systemKv/SystemKVStore.ts | Comment divider style updates. |
| src/backend/stores/subdomain/SubdomainStore.js | Comment divider style updates. |
| src/backend/stores/share/ShareStore.js | Comment divider style updates. |
| src/backend/stores/session/SessionStore.js | Comment divider style updates. |
| src/backend/stores/permission/PermissionStore.ts | Comment divider style updates. |
| src/backend/stores/oidc/OIDCStore.js | Comment divider style updates. |
| src/backend/stores/notification/NotificationStore.js | Comment divider style updates. |
| src/backend/stores/group/GroupStore.ts | Comment divider style updates. |
| src/backend/stores/fs/FSEntryStore.ts | Comment divider style updates. |
| src/backend/stores/app/AppStore.js | Comment divider style updates. |
| src/backend/services/socket/SocketService.ts | Comment divider style updates. |
| src/backend/services/permission/permissionUtil.ts | Comment divider style updates. |
| src/backend/services/permission/PermissionService.ts | Comment divider style updates. |
| src/backend/services/notification/NotificationService.ts | Comment divider style updates. |
| src/backend/services/metering/MeteringService.ts | Comment divider style updates. |
| src/backend/services/homepage/PuterHomepageService.ts | Comment divider style updates. |
| src/backend/services/fs/FSService.ts | Comment divider style updates. |
| src/backend/services/broadcast/BroadcastService.ts | Comment divider style updates. |
| src/backend/services/auth/types.ts | Comment divider style updates. |
| src/backend/services/auth/TokenService.ts | Add hosted-asset auth_id claim compression; comment divider style updates. |
| src/backend/services/auth/OIDCService.ts | Comment divider style updates. |
| src/backend/services/auth/AuthService.ts | Add v2 cookie names, mint/verify hosted-asset tokens with auth_id, and revoke-cascade checks; comment divider style updates. |
| src/backend/services/auth/AuthService.test.ts | Update for async verify + add tests for v2 cookie/token behavior and revocation cascade. |
| src/backend/services/apps/SuggestedAppsService.ts | Comment divider style updates. |
| src/backend/services/apps/AppPermissionService.ts | Comment divider style updates. |
| src/backend/services/appIcon/AppIconService.ts | Comment divider style updates. |
| src/backend/services/acl/ACLService.ts | Comment divider style updates. |
| src/backend/server.ts | Comment divider style updates. |
| src/backend/extensions.ts | Comment divider style updates. |
| src/backend/drivers/workers/WorkerDriver.ts | Comment divider style updates. |
| src/backend/drivers/util/aiLimits.ts | Comment divider style updates. |
| src/backend/drivers/subdomain/SubdomainDriver.ts | Comment divider style updates. |
| src/backend/drivers/notification/NotificationDriver.ts | Comment divider style updates. |
| src/backend/drivers/meta.ts | Comment divider style updates. |
| src/backend/drivers/apps/AppDriver.js | Comment divider style updates. |
| src/backend/drivers/ai-tts/TTSDriver.ts | Comment divider style updates. |
| src/backend/drivers/ai-ocr/OCRDriver.ts | Comment divider style updates. |
| src/backend/drivers/ai-chat/providers/moonshot/models.ts | Comment divider style updates. |
| src/backend/drivers/ai-chat/providers/alibaba/models.ts | Comment divider style updates. |
| src/backend/drivers/ai-chat/ChatCompletionDriver.ts | Comment divider style updates. |
| src/backend/core/http/types.ts | Comment divider style updates. |
| src/backend/core/http/PuterRouter.ts | Comment divider style updates. |
| src/backend/core/http/middleware/userProtected.ts | Add createWebSessionActorGate for session-management routes; comment divider style updates. |
| src/backend/core/http/middleware/rateLimit.js | Comment divider style updates. |
| src/backend/core/http/middleware/puterSiteConfig.ts | Comment divider style updates. |
| src/backend/core/http/middleware/puterSite.ts | Write v2 hosted-asset cookies (private + public) instead of legacy names. |
| src/backend/core/http/middleware/privateAppGate.ts | Read v2 cookie names first + async public-token verify; legacy fallback behavior. |
| src/backend/core/http/middleware/captcha.js | Comment divider style updates. |
| src/backend/core/http/middleware/antiCsrf.js | Comment divider style updates. |
| src/backend/core/http/decorators.ts | Comment divider style updates. |
| src/backend/core/context.ts | Comment divider style updates. |
| src/backend/controllers/webdav/WebDAVController.ts | Comment divider style updates. |
| src/backend/controllers/webdav/locks.ts | Comment divider style updates. |
| src/backend/controllers/system/SystemController.js | Comment divider style updates. |
| src/backend/controllers/static/StaticPagesController.ts | Comment divider style updates. |
| src/backend/controllers/share/ShareController.ts | Comment divider style updates (commented-out routes section). |
| src/backend/controllers/puterai/PuterAIController.ts | Comment divider style updates. |
| src/backend/controllers/oidc/OIDCController.ts | Comment divider style updates. |
| src/backend/controllers/hosting/HostingController.js | Comment divider style updates. |
| src/backend/controllers/homepage/HomepageController.ts | Comment divider style updates. |
| src/backend/controllers/fs/legacyFsHelpers.ts | Comment divider style updates. |
| src/backend/controllers/fs/LegacyFSController.ts | Comment divider style updates. |
| src/backend/controllers/fs/FSController.ts | Comment divider style updates. |
| src/backend/controllers/drivers/DriverController.ts | Comment divider style updates. |
| src/backend/controllers/desktop/DesktopController.js | Comment divider style updates. |
| src/backend/controllers/auth/AuthController.ts | Add auth_id preservation/reauth logic + session-management gate change + rate limiting; comment divider style updates. |
| src/backend/controllers/auth/AuthController.test.ts | Add tests for auth_id preservation and rate limiting behavior. |
| src/backend/controllers/apps/AppController.js | Comment divider style updates. |
| src/backend/clients/email/EmailClient.ts | Comment divider style updates. |
| src/backend/clients/alarm/AlarmClient.ts | Comment divider style updates. |
| extensions/thumbnails.ts | Comment divider style updates. |
| AGENTS.md | Document “no tickets in comments” and ASCII-only divider guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a3a1df0 to
f6a9386
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
temp account preservation on forced relogin
hosted asset cookies to v2 token too