Whenever I restart the authelia container it forgets authenticated users, which results in the need to authenticate again.
I'm mounting the container as such:
auth:
image: clems4ever/authelia
restart: always
depends_on:
- freeipa
volumes:
- /etc/localtime:/etc/localtime:ro
- /path/to/storage/authelia/config.yml:/etc/auth-server/config.yml:ro
- /path/to/storage/authelia/notifications:/var/lib/auth-server/notifications
- /path/to/storage/authelia/store:/var/lib/auth-server/store
networks:
- backend
Browsing the store folder looking into the files tells me things get stored correctly. So I'm assuming this might be an oversight in the code? Or is this by design?
Hello @jkaberg , the session are only stored in memory and not persisted yet. It explains why the users are logged off when restarting the application. However, the express-session package allows us to implement session persistence with key value stores like redis. This would be yet another component in the architecture but I planned to add it at some point for scalability.
I'm already using Redis with another app so thats fine by me if you decied to go with Redis 馃槃
I'll give it a try then. After Redis I'll rework the DB and Authelia will be fully scalable. Good thing! :)
I'll keep you posted in the coming weeks since I'm also migrating the project to typescript in the meantime.
Hello @jkaberg,
I've started the development of this feature in the redis-sessions branch. It works already but I need to more unit and integration tests to merge it in mainstream. I'll keep you posted.
Hello @jkaberg ,
I merged the pull request #47. Your users won't be unauthenticated anymore when the service restarts.
Thanks @clems4ever, works like a dream!