# Unable to connect in some containerized app if logged in Yunohost

**URL:** https://forum.yunohost.org/t/unable-to-connect-in-some-containerized-app-if-logged-in-yunohost/26906
**Category:** Advanced use case
**Tags:** bug, english
**Created:** [October 26, 2023, 10:12am UTC](https://forum.yunohost.org/t/unable-to-connect-in-some-containerized-app-if-logged-in-yunohost/26906 "2023-10-26T10:12:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pihomeserver](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pihomeserver/32/6923_2.png) [@pihomeserver](https://forum.yunohost.org/u/pihomeserver)
#### Post date: [October 26, 2023, 10:12am UTC](https://forum.yunohost.org/t/unable-to-connect-in-some-containerized-app-if-logged-in-yunohost/26906/1 "2023-10-26T10:12:16Z")

</div>

### My YunoHost server

**Hardware:** VPS bought online…  
**YunoHost version:** 11.2.5  
**I have access to my server :** Through SSH  
**Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?** : no

### Description of my issue

With some applications in containers the authentication fails until i log out from Yunohost. That the case with containers like Mealie or Portainer  
I use the Redirect app for a public proxy (as a private proxy i’m fully stuck as i can’t log out) and redirect to the localhost and port of the container

The JWT tokens are not used by the app once authenticated. If i log out from Yunohost then i can log in and use the app. If i log back to yunohost then i’m fired from the app and blocked again

I tried to update the Nginx config of redirect but it sounds more as a problem from the global configuration

Any help is welcome

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 26, 2023, 3:50pm UTC](https://forum.yunohost.org/t/unable-to-connect-in-some-containerized-app-if-logged-in-yunohost/26906/2 "2023-10-26T15:50:26Z")

</div>

I think it is the authentication header injected by SSOwat that’s clashing with the authentication within your containers.

Let’s try to fix that:

```bash
# "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)"

```

(taken from the app helper code [https://github.com/YunoHost/yunohost/blob/6f1a00922a8fa866823ecd87dc6e6da2ab8e5005/helpers/permission#L245](https://github.com/YunoHost/yunohost/blob/6f1a00922a8fa866823ecd87dc6e6da2ab8e5005/helpers/permission#L245), since the Redirect app does not offer to tweak this header)

🤞

---

<div class="post-metadata">

### Author: ![pihomeserver](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pihomeserver/32/6923_2.png) [@pihomeserver](https://forum.yunohost.org/u/pihomeserver)
#### Post date: [October 27, 2023, 9:31am UTC](https://forum.yunohost.org/t/unable-to-connect-in-some-containerized-app-if-logged-in-yunohost/26906/3 "2023-10-27T09:31:08Z")

</div>

Ok i think that even with many days more i would have never find how to that !

Impressive knowledge. Thanks a lot

PS : i will push the solution in Redirect app issues to help other users

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [November 26, 2023, 9:31am UTC](https://forum.yunohost.org/t/unable-to-connect-in-some-containerized-app-if-logged-in-yunohost/26906/4 "2023-11-26T09:31:53Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
