Describe the bug
When configuring OpenCloud to use an external OIDC Identity Provider (such as Authelia) and removing the offline_access scope from both the IDP client setup and OpenCloud's WEBFINGER_ANDROID_OIDC_CLIENT_SCOPES variable, it is impossible to perform the initial login on the Android app.
Immediately after completing the authentication on the Identity Provider, the login flow fails and the app displays the error "invalid refresh token".
To Reproduce
Configure an external OIDC Provider (e.g., Authelia) without the offline_access scope enabled for the Android client.
Override the WebFinger environment variable in OpenCloud to exclude offline_access:
WEBFINGER_ANDROID_OIDC_CLIENT_SCOPES=openid profile email
Open the OpenCloud Android app, clear data/cache if previously configured, and attempt to add the account/server.
Complete the login flow on the external IdP.
Notice the error "invalid refresh token" right after authorization, preventing account creation.
Expected behavior
The app should handle OIDC authentication gracefully even if the offline_access scope is omitted and no Refresh Token is issued by the Provider, falling back to standard access token management instead of failing during the initial token exchange.
Context / Motivation
We are trying to remove offline_access because having offline_access / refresh_token flow triggers Authelia's explicit user consent screen, which degrades the UX. Removing offline_access is a standard approach to avoid consent prompts in some IdP setups, but the app currently enforces a refresh token check upon login.
Describe the bug
When configuring OpenCloud to use an external OIDC Identity Provider (such as Authelia) and removing the offline_access scope from both the IDP client setup and OpenCloud's WEBFINGER_ANDROID_OIDC_CLIENT_SCOPES variable, it is impossible to perform the initial login on the Android app.
Immediately after completing the authentication on the Identity Provider, the login flow fails and the app displays the error "invalid refresh token".
To Reproduce
Configure an external OIDC Provider (e.g., Authelia) without the offline_access scope enabled for the Android client.
Override the WebFinger environment variable in OpenCloud to exclude offline_access:
WEBFINGER_ANDROID_OIDC_CLIENT_SCOPES=openid profile emailOpen the OpenCloud Android app, clear data/cache if previously configured, and attempt to add the account/server.
Complete the login flow on the external IdP.
Notice the error "invalid refresh token" right after authorization, preventing account creation.
Expected behavior
The app should handle OIDC authentication gracefully even if the offline_access scope is omitted and no Refresh Token is issued by the Provider, falling back to standard access token management instead of failing during the initial token exchange.
Context / Motivation
We are trying to remove offline_access because having offline_access / refresh_token flow triggers Authelia's explicit user consent screen, which degrades the UX. Removing offline_access is a standard approach to avoid consent prompts in some IdP setups, but the app currently enforces a refresh token check upon login.