adobe / adobe/da-live

Disconnect user if a 401 happens in collab

Open
#563 1 comment 0 reactions 0 assignees View on GitHub
bug customer impact
Dominant language
JavaScript
Stars
34
Forks
71
Avg merge
2d 11h
Merged PRs (30d)
29

Description

When a non-authorized user opens a page, it is forced to sign-in. But if while editing and for some unidentified yet reason (token expired, worker reloaded... ?) user is not authorized anymore, they can continue authoring for a long time. On page reload, all changes would be gone.

The websocket could detect that case and force a re-signing.

We need to be careful because we observe a lot of `401` in the logs, I suspect the auth to not be fully stable. It might end up that users get disconnected way too frequently (which would be expected but a consequence of something wrong...)

See also thread https://cq-dev.slack.com/archives/C08MJQ0Q3GA/p1757005611676039

In the video recording of the issue, we can see:
- someone authoring a page for a couple of minutes
- when trying to preview, the envelop icon becomes red
- after scrolling to the top of the page, an error message is shown: `Not authorized to preview`
- after re-login (IMS...), several minutes of changes are gone. Based on the logs, I would say aprox 4mins of changes...

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by tracing websocket handling for 401 responses and reviewing the linked Slack thread and authentication logs, then compare the behavior with the recorded sequence: continued editing, a red envelope, and a preview authorization error. Done should be defined around preventing silent loss of edits while handling expired authorization without excessive disconnects.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.