YunoHost-Apps / redirect_ynh

Redirection app for YunoHost
GNU Affero General Public License v3.0
43 stars 21 forks source link

After authentication application does not see me as authenticated (missing headers ?) #43

Closed pihomeserver closed 11 months ago

pihomeserver commented 1 year ago

Describe the bug

Once OhMyForm or Mealie containers are deployed and behind the Redirect App, i can't authenticate (credentials validated by the app) but in the front looks like headers are not available and it remains on the login page

Context

Steps to reproduce

Run the docker version of Mealie for example Use Redirect as private proxy to access the container for the Yunohost portal Try to connect

pihomeserver commented 11 months ago

New information about the issue : I try to use Portainer on my installation. Like previous app, authentication does not work from the web ui but from the shell on the VPS it ends successfully. My app is published as public proxy. Then i found that if i log out from Yunohost then i can log into my app successfully. As soon as i log in Yunohost again then the access to Portainer is blocked and failing.

I don't see what could be the reason except maybe some dedicated headers ?

pihomeserver commented 11 months ago

Solution is not so easy

# "redirect" to be replaced by that actual app id: redirect__2, redirect__3, etc.
app=redirect
sudo yunohost tools shell -c "from yunohost.permission import permission_url; permission_url('$app.main' ,auth_header=False)"

Link to the post : https://forum.yunohost.org/t/unable-to-connect-in-some-containerized-app-if-logged-in-yunohost/26906

Maybe it could be an option of the Redirect app ?