Repository navigation
fix(flux-web): request offline_access so sessions refresh - #29
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add offline access scope infrastructure/flux-web/external-secret.yaml |
The scope list adds offline_access. Comments describe its refresh-token behavior and session expiration without the scope. |
Priority:
Change: Bug fix
Merge Risk: 
Minimal · up to 28a4d
-
The requested OAuth2 scope is added without removing existing scopes, so the change is ready to merge.
Pre-merge checks: 
4
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Problem
Flux Web and Grafana log people out after about 5 minutes, even though "stays signed in" is ticked for both apps in the auth admin.
Cause
Ticking "stays signed in" in the auth admin only allows an app to ask for the
offline_accessscope. The app still has to request it. Neither app does:scopes: [openid, profile, email, "polinetwork:identity"]. Settingscopesreplaces Flux's defaults, and the defaults includeoffline_access.openid profile email polinetwork:identity.Without
offline_access, auth.polinetwork.org issues no refresh token. Access and ID tokens last 5 minutes. When they expire, both apps have nothing to refresh with, so they end the session.I checked this against the IdP with a local test: the same client gets no refresh token without
offline_access. With it, it gets one, and refreshing returns a new access token, refresh token and ID token.Fix
Add
offline_accessto the Flux Web scopes. The IdP needs PKCE or a nonce foroffline_access; Flux Web already sends both. It watches this secret and reloads, so no restart is needed.Also needed (not in git)
offline_accessto Scopes and save. "Use refresh token" and "Use PKCE" are already on.invalid_scope.