What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.17 (stable)
How are you able to access your server: The webadmin
SSH
Original post edited for simplification.
My original post was unnecessarily over-complicated as it was an AI generation based on countless hours of console logs.
Describe your issue
Hello YunoHost community,
I encountered an issue where YunoHost’s SSO was intercepting an OAuth2 callback URL for an application (specifically n8n), preventing the authentication flow from completing. This happened despite attempts to configure SSO bypasses directly.
The core problem seemed to be that I could not update ssowat configuration snippets for the application’s domain, meaning my bypass rules were never applied.
I’m relatively new to working with YunoHost, but I spend hours looking through related forum posts and trying every possible solution I came across, without much luck.
Here’s what finally worked:
I resolved this by manually editing the application’s Nginx configuration file (/etc/nginx/conf.d/your.domain.d/your_app.conf).
Specifically, I added a new location block for the OAuth callback path before the generic location / block. This new location block uses proxy_pass to forward the request directly to the application’s internal port, and crucially, it does not include the access_by_lua_file /usr/share/ssowat/access.lua; directive. The access_by_lua_file directive was then moved inside the generic location / block.
This ensures that the specific OAuth callback path bypasses SSOwat entirely.
After saving the Nginx configuration and running sudo nginx -t (to check syntax) and sudo nginx -s reload (to apply changes), the OAuth flow completed successfully.
This workaround directly addresses the Nginx configuration, bypassing the automated ssowat configuration.
Hope this helps anyone facing a similar problem!