GoogleCloudPlatform / GoogleCloudPlatform/gcc-creative-studio

Session unexpectedly expires and clears reference images/video/audio on reload

Open
#258 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
144
Forks
385
Avg merge
1d 46m
Merged PRs (30d)
5

Description

The app "constantly logging off users" with the UI resetting. Root-caused to four separate defects in the frontend auth/session handling:

1. **No token refresh existed.** The Firebase ID token was read from cache only; once the ~1 hour token expired, every subsequent request failed.
2. **Requests silently dropped when no session was cached**, rather than surfacing an error — the caller received neither a response nor a failure.
3. **A pure predicate (`isLoggedIn()`) had a navigation side effect**, redirecting to `/login` as a byproduct of being consulted on every HTTP request — so any request made after the cached token aged out could bounce the user off whatever page they were on.
4. **A brief null `currentUser` state during Firebase's async session restore was treated as "logged out"**, logging out users on a plain page refresh even when Firebase would have recovered the session moments later.

Separately, the video generation page discarded attached reference images/video/audio on every save and restore cycle, so a reload — including one caused by defect 4 — silently cleared whatever the user had attached, compounding the perceived data loss.

Contributor guide

Open the contributing guide

Research direction

Start by locating the frontend Firebase auth/session handling and the video generation page's save and restore cycle. Trace cached-token requests, missing-session handling, navigation side effects, and the async currentUser restore state. Then verify that attached reference images, video, and audio survive reloads and that expired sessions recover or report errors without clearing the page.

Written by the indexing model from the issue text.

Assessment

Tech stack
firebase
Domain
authentication, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.