Skip to content

Token refresh during upload process ["Host requires authentication"] #3050

Closed

Description

@kenetrix

Describe the bug

If I upload files (~50MB) with the OpenCloud Desktop App, at some point during process I get the error "Host requires authentication". Then I have to restart the sync and the rest of the files can be uploaded successfully.
I have configured OIDC with PocketID.

Steps to reproduce

  1. OIDC PocketID
  2. Config Desktop App
  3. Upload files with a size that the upload time i about some seconds.
  4. Error message during upload
  5. Restart sync process
  6. Upload success

Expected behavior

Authentication is valid during the whole upload process and does not get interrupted.

Actual behavior

Upload interrupted

Setup

I have setup the app behind nginx reverse proxy. I have configured npm with timeouts about 1 hour and:

client_max_body_size 200M;
proxy_request_buffering off;
proxy_buffering off;

Also I have configured PocketID OIDC. The Dektop client_id is set like described in documentation. (and it works, i can connect in general)

Details

OC_EXCLUDE_RUN_SERVICES=idp
OC_OIDC_ISSUER=https://pocket.mydomain.de
IDP_DOMAIN=pocket.mydomain.de

PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD=none
PROXY_OIDC_REWRITE_WELLKNOWN=true
PROXY_USER_OIDC_CLAIM=preferred_username
PROXY_USER_CS3_CLAIM=username

PROXY_AUTOPROVISION_ACCOUNTS=true
WEB_OIDC_SCOPE=openid profile email groups
GRAPH_ASSIGN_DEFAULT_USER_ROLE=false
PROXY_ROLE_ASSIGNMENT_DRIVER=default

WEB_OIDC_CLIENT_ID=6d498bba-2fec-42cc-8187-7bbad3add820
WEB_OIDC_METADATA_URL=https://pocket.mydomain.de/.well-known/openid-configuration

Activity

  1. changed the title [-]Token refresh during upload process[/-] [+]Token refresh during upload process ["Host requires authentication"][/+] on Jun 30, 2026
  2. micbar commented on Jun 30, 2026

    @micbar
    Member

    Can you check the idp for token refresh errors?

  3. kenetrix commented on Jun 30, 2026

    @kenetrix
    Author

    The IDP starts to log "too many requests" (on the userinfo endpoint) as soon as i start the upload.
    After the first files are uploaded, the upload again freezes, and the logs are fine again, just logging a frequently get request on the userinfo endpoint with status 200.

    Jun 30 22:36:38 pocketid pocket-id[4498]: Jun 30 22:36:38 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:38 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=112.183µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:38 pocketid pocket-id[4498]: Jun 30 22:36:38 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:38 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=51.001µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:38 pocketid pocket-id[4498]: Jun 30 22:36:38 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:38 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=54.138µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:38 pocketid pocket-id[4498]: Jun 30 22:36:38 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:38 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=68.672µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:38 pocketid pocket-id[4498]: Jun 30 22:36:38 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:38 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=56.586µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:38 pocketid pocket-id[4498]: Jun 30 22:36:38 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:38 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/.well-known/openid-configuration query="" route=/.well-known/openid-configuration ip=192.168.0.199 latency=45.902µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:38 pocketid pocket-id[4498]: Jun 30 22:36:38 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:38 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=62.842µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:38 pocketid pocket-id[4498]: Jun 30 22:36:38 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:38 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=72.917µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:39 pocketid pocket-id[4498]: Jun 30 22:36:39 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:39 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=59.681µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:39 pocketid pocket-id[4498]: Jun 30 22:36:39 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:39 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=51.721µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:39 pocketid pocket-id[4498]: Jun 30 22:36:39 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:39 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/.well-known/openid-configuration query="" route=/.well-known/openid-configuration ip=192.168.0.199 latency=53.496µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:39 pocketid pocket-id[4498]: Jun 30 22:36:39 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:39 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/.well-known/openid-configuration query="" route=/.well-known/openid-configuration ip=192.168.0.199 latency=54.69µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:39 pocketid pocket-id[4498]: Jun 30 22:36:39 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:39 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/.well-known/openid-configuration query="" route=/.well-known/openid-configuration ip=192.168.0.199 latency=53.315µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/.well-known/openid-configuration query="" route=/.well-known/openid-configuration ip=192.168.0.199 latency=44.356µs referer="" user_agent=Go-http-client/1.1 body_size=1371
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 INF Request app=pocket-id version=2.9.0 status=200 method=POST path=/api/oidc/token query="" route=/api/oidc/token ip=192.168.0.199 latency=14.81644ms referer="" user_agent="OpenCloudApp/1.2.3 (App/4; iOS/26.5; iPhone)" body_size=2634
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=1.04981ms referer="" user_agent=Go-http-client/1.1 body_size=393
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=1.334211ms referer="" user_agent=Go-http-client/1.1 body_size=393
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=903.379µs referer="" user_agent=Go-http-client/1.1 body_size=393
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=860.693µs referer="" user_agent=Go-http-client/1.1 body_size=393
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:44 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=48.199µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:44 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=45.681µs referer="" user_agent=Go-http-client/1.1 body_size=29
    Jun 30 22:36:44 pocketid pocket-id[4498]: Jun 30 22:36:44 WRN Request with errors: Error #01: Too many requests
    Jun 30 22:36:44 pocketid pocket-id[4498]:  app=pocket-id version=2.9.0 status=429 method=POST path=/api/oidc/token query="" route=/api/oidc/token ip=192.168.0.199 latency=36.445µs referer="" user_agent="OpenCloudApp/1.2.3 (App/4; iOS/26.5; iPhone)" body_size=29
    Jun 30 22:37:03 pocketid pocket-id[4498]: Jun 30 22:37:03 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=2.405259ms referer="" user_agent=Go-http-client/1.1 body_size=393
    Jun 30 22:37:03 pocketid pocket-id[4498]: Jun 30 22:37:03 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/api/oidc/userinfo query="" route=/api/oidc/userinfo ip=192.168.0.199 latency=879.998µs referer="" user_agent=Go-http-client/1.1 body_size=393
    Jun 30 22:37:07 pocketid pocket-id[4498]: Jun 30 22:37:07 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/.well-known/openid-configuration query="" route=/.well-known/openid-configuration ip=192.168.0.199 latency=35.281µs referer=https://cloud.domain.de/ user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36" body_size=1371
    Jun 30 22:37:07 pocketid pocket-id[4498]: Jun 30 22:37:07 INF Request app=pocket-id version=2.9.0 status=200 method=POST path=/api/oidc/token query="" route=/api/oidc/token ip=192.168.0.199 latency=14.493062ms referer=https://cloud.domain.de/ user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36" body_size=2802
    Jun 30 22:37:08 pocketid pocket-id[4498]: Jun 30 22:37:08 INF Request app=pocket-id version=2.9.0 status=200 method=GET path=/.well-known/openid-configuration query="" route=/.well-known/openid-configuration ip=192.168.0.199 latency=33.506µs referer="" user_agent=Go-http-client/1.1 body_size=1371
    Jun 30 22:37:08 pocketid pocket-id[4498]: Jun 30 22:37:08 INF Request app=pocket-id version=2.9.0 status=200 method=POST path=/api/oidc/token query="" route=/api/oidc/token ip=192.168.0.199 latency=14.235094ms referer="" user_agent="Mozilla/5.0 (Windows) mirall/3.0.3.2073 (OpenCloud, windows-10.0.26200 ClientArchitecture: x86_64 OsArchitecture: x86_64)" body_size=2650
    
  4. micbar commented on Jul 1, 2026

    @micbar
    Member

    Thank you!

    That feels weird. I am not sure what could be wrong here.

    @rhafer @butonic I thought we were caching the userinfo for 60 seconds?

  5. stonith404 commented on Jul 1, 2026

    @stonith404
    Contributor

    I ran into the same issue while testing OpenCloud with Pocket ID. The problem seems to be that PROXY_OIDC_USERINFO_CACHE_TTL is parsed, but not applied to the OIDC authenticator.

    I opened a PR with a small fix: #3056

  6. basdp commented on Jul 4, 2026

    @basdp

    As a temporary workaround, you can set DISABLE_RATE_LIMITING=true on the PocketID container. At your own risk of course.

  7. moved this from Qualification to Done in OpenCloud Team Boardon Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions