You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] 2FA problem: Does not take authorization in the first go #4508
-When you authorize using 2FA (here: via Free OTP) you have to perform the authentication procedure twice.
Expected behaviour
-The app should accept the authorization the first time it is presented
Steps to reproduce
Start OwnCloud app and connect to the cloud
You get redirected due to authorization expiration, so you enter your credentials in the Web browser that is opened for you, then you create the token for 2FA (here: via Free OTP) and enter it. In the browser the cloud opens up and also a popup comes that asks you "open in app?"
Agree to opening in the app, OwnCloud app comes up again, but: complains about expiration once more, so go back to step 2 and repeat everything. This time the autorization gets accepted.
Android version:
10 (AOSP, Fairphone Open OS 23.02.0-rel.0 (latest version)
Device model:
Fairphone 2
Stock or customized system:
AOSP, but officially supported the manufacturer of the phone (Fairphone).
ownCloud app version:
4.4.1 (latest) - but this behaviour was also present on the two previous versions
ownCloud server version:
unknown (hosted by my employer).
Additional remark: This behaviour is only exhibited if the authorization gets refreshed. When you delete the account and set it up from scratch, the app will take the authorization in the first attempt!
So, you have 2FA with an external OTP. The process finishes, but, you see an "expiration" message on the bottom of the screen that prompts you to a second authentication.
My guess is that the granted token is not correctly used in the first requests under a race condition
It'd help to know which kind of server and version are you using. If you type in your web browser the server URL following with /status.php, you will see some information that you can prompt to us.
For example: https://thisismyserver.com/status.php
Info from our company admins: Server version is 10.15. The output I quoted is what the browser (MS Edge via internal network connection) presented to me.
Hm, there is no settings -> logs. There is a protocol feature, is that what you mean? It's not under More or Advanced... Or are you talking about the backend? I don't have access, all I can do is ask our admins...
In the mobile app, by clicking on the top left icon (hamburger icon), the side menu is open. Then, select Settings, then Logging and Log Files . Please, mark the Log HTTP requests option for a better logging of the situation.
changed the title [-][BUG]2FA problem: Does not take authorization in the first go[/-][+][BUG] 2FA problem: Does not take authorization in the first go[/+]on Feb 14, 2025
Caveat: [FIX] Token request with Bearer returns error #4586's change is scoped to the konnect/OIDC token endpoint — it only skips the auth header for /konnect/v1/token (OwnCloudClient.java:141, master). Your server is oC10 10.15, whose OAuth2 token endpoint is not that path, so [FIX] Token request with Bearer returns error #4586 likely does not cover the oC10 refresh case. I can't locate a concrete oC10-specific defect in current source, so I'm not marking this confirmed.
To move it forward:
Retest on 4.8.2 — several auth/refresh fixes landed between 4.4.1 and now; the refresh path may already behave correctly for you.
If it still repeats on 4.8.2, the HTTP logs @jesmrec requested are the blocker: Settings → Logging → Log Files, enable Log HTTP requests, reproduce the double-auth, attach the log. Without them the "second attempt required" symptom (works on fresh setup, fails on refresh) can't be pinned.
Activity
hman2 commentedon Nov 4, 2024
Additional remark: This behaviour is only exhibited if the authorization gets refreshed. When you delete the account and set it up from scratch, the app will take the authorization in the first attempt!
jesmrec commentedon Nov 5, 2024
So, you have 2FA with an external OTP. The process finishes, but, you see an "expiration" message on the bottom of the screen that prompts you to a second authentication.
Maybe this is related with #4332
My guess is that the granted token is not correctly used in the first requests under a race condition
It'd help to know which kind of server and version are you using. If you type in your web browser the server URL following with
/status.php, you will see some information that you can prompt to us.For example:
https://thisismyserver.com/status.phpThanks a lot for reporting!
hman2 commentedon Nov 6, 2024
{
"installed": true,
"maintenance": false,
"needsDbUpgrade": false,
"version": "",
"versionstring": "",
"edition": "",
"productname": "",
"product": ""
}
jesmrec commentedon Nov 6, 2024
@hman2 are all those fields (product, productname...) empty or any problem with copy/paste?, these are the key fields :(
hman2 commentedon Nov 7, 2024
Info from our company admins: Server version is 10.15. The output I quoted is what the browser (MS Edge via internal network connection) presented to me.
jesmrec commentedon Nov 7, 2024
Ok, so it's an oC10, thanks. We'll review. Also, if you can attach logs (you'll find in settings -> logs), it could help to clarify.
hman2 commentedon Nov 7, 2024
Hm, there is no settings -> logs. There is a protocol feature, is that what you mean? It's not under More or Advanced... Or are you talking about the backend? I don't have access, all I can do is ask our admins...
jesmrec commentedon Nov 7, 2024
In the mobile app, by clicking on the top left icon (hamburger icon), the side menu is open. Then, select
Settings, thenLoggingandLog Files. Please, mark theLog HTTP requestsoption for a better logging of the situation.[-][BUG]2FA problem: Does not take authorization in the first go[/-][+][BUG] 2FA problem: Does not take authorization in the first go[/+]DeepDiver1975 commentedon Jul 2, 2026
Triage note — needs current-version retest + logs. Not a confirmed located cause.
Where things stand since 2024:
Bearerreturns error #4586 and shipped in 4.6.0 (2025-07-21). You reported this on 4.4.1 (2024-10-29), which predates that fix. Latest is 4.8.2.Bearerreturns error #4586's change is scoped to the konnect/OIDC token endpoint — it only skips the auth header for/konnect/v1/token(OwnCloudClient.java:141, master). Your server is oC10 10.15, whose OAuth2 token endpoint is not that path, so [FIX] Token request withBearerreturns error #4586 likely does not cover the oC10 refresh case. I can't locate a concrete oC10-specific defect in current source, so I'm not marking this confirmed.To move it forward:
Will keep open pending a 4.8.2 retest + logs.
🤖 Generated with Claude Code