nextcloud / nextcloud/user_oidc
Nextcloud site constantly reloading due to token refresh
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 181
- Forks
- 60
- Avg merge
- 7h 34m
- Merged PRs (30d)
- 26
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Ever since #1391, Nextcloud often reloads the page, losing any progress in whatever was being worked on.
Steps to reproduce
- Log in using an OIDC IDP with the
store_login_tokenoption enabled (used Authentik). - Wait the
isExpiring()threshold duration. - Lose any in-progress work on your current page (any app which does not constantly silently save progress), as Nextcloud reloads and goes through the token exchange flow.
Expected behaviour
In-progress work should not be lost and the focused page should not arbitrarily redirect away if possible...
Behaviour this invasive should at least come with a separate toggle in the UI and a warning message.
Actual behaviour
After the token refresh timeout, even if the user is working on something, a browser redirection flow begins to
/login?redirect_url=.../apps/user_oidc/login/1?redirectUrl=...https://idp..../application/o/authorize/?.../apps/user_oidc/code?...&state=...
before finally landing back on the current page url, with any previous unsaved work in progress on that page lost in the process.
Server configuration
Web server: docker nextcloud:apache
Database: PostgreSQL
PHP version: 8.4
Nextcloud version: 33.0.4
Browser
Browser name: Firefox
Browser version: 151.0.2
Operating system: Fedora 44
IDP: Authentik
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the token refresh flow introduced by #1391, including the isExpiring() threshold and the /login, /apps/user_oidc/login/1, and /apps/user_oidc/code entry points. Reproduce with store_login_token enabled and an OIDC provider, then verify that an active page no longer enters the redirect flow or loses unsaved work after the refresh timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100