[Bookworm] Android shortcuts to homescreen or pinned tabs are redirected to the user portal
Describe the bug
There are two cases where this happens:
- I have a shortcut on my android's homescreen to sub.domain.tld (managed by my yunohost, as well as domain.tld).
- I have a pinned tab to sub.domain.tld in my browser
Sometimes I need to authenticate, which is normal. Once authenticated I am redirected to domain.tld/sso/portal (or something like that) whereas I want to stay (or go back to) on sub.domain.tld. This is particularly important for webapps.
I then need to click on the app (in the user portal) I initially wanted, which is annoying.
This was not happening before Yunohost 12.
Context
- Hardware: VPS bought online
- YunoHost version: 12.0.7
- I have access to my server: Through SSH | through the webadmin | direct access via keyboard / screen | ...
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
To reproduce
Pin a tab, or add a shortcut to your homescreen, from a subdomain belonging to your Yunohost. Then wait for your session to expire, launch this shortcut/tab and authenticate.
Expected behavior
To remain on the URL I went to in the first place (before authentication).
Logs
I don't know what logs I should provide?
duplicate of #2474
@OniriCorpe #2474 is different. Here, my main domain is hosted on the same server.
In /etc/ssowat/config.json:
{
[...]
"domain_portal_urls": {
"annonces.domain.tld": "domain.tld/yunohost/sso",
"blog.domain.tld": "domain.tld/yunohost/sso",
"cal.domain.tld": "domain.tld/yunohost/sso",
"code.domain.tld": "domain.tld/yunohost/sso",
"cv.domain.tld": "domain.tld/yunohost/sso",
"default": "/yunohost/admin",
"demo.domain.tld": "domain.tld/yunohost/sso",
"k.domain.tld": "domain.tld/yunohost/sso",
"mail.domain.tld": "domain.tld/yunohost/sso",
"matrix.domain.tld": "domain.tld/yunohost/sso",
"misc.domain.tld": "domain.tld/yunohost/sso",
"nc.domain.tld": "domain.tld/yunohost/sso",
"domain.tld": "domain.tld/yunohost/sso",
"office.domain.tld": "domain.tld/yunohost/sso",
"pix.domain.tld": "domain.tld/yunohost/sso",
"rss.domain.tld": "domain.tld/yunohost/sso",
"stats.domain.tld": "domain.tld/yunohost/sso",
"wb.domain.tld": "domain.tld/yunohost/sso"
},
[...]
}
Editing /etc/ssowat/conf.persistent.json by copying the domain_portal_urls to use the subdomain instead of root domain fixes the issue. But I don't think I should do it manually.
Maybe the info can help solve the issue though?
My previous answer is actually not the solution: while it seems to solve the issue when logged out, it breaks the behaviour when logged: the portal just displays a message saying there are no apps on this domain.
Hello,
I confirm I've the same issue.
I confirm this issue also in android and I have something similar on desktop with searx : https://github.com/YunoHost-Apps/searxng_ynh/issues/363#issuecomment-2591153674
Applying the solution in Use samesite lax for portal cookies YunoHost/yunohost fixes the issue.
Now, it would be great if we did not have to do it manually…
Fixed in https://github.com/YunoHost/yunohost/pull/2018 I think, I'll reopen the issue if needed
I don't understand, it is failing again, and my file still contains the lax attribute…
I am still having the issue… Am I the only one?
What debug data can I provide to help?