Really wanted to use Fief... using KeyCloak instead #94
Replies: 3 comments
-
Hail, @brent-stone 👋 I've noticed you shared secret values: For your security, I've taken the liberty to replace them with dummy values. |
Beta Was this translation helpful? Give feedback.
-
Hail, @brent-stone 👋 Welcome to Fief's kingdom! Our team will get back to you very soon to help. In the meantime, take a minute to star our repository ⭐️ Farewell! |
Beta Was this translation helpful? Give feedback.
-
Hi @brent-stone 👋 I'm sorry to hear that 😞 There's probably something wrong with the configuration. My guess is that you customized the cookie domains:
There are some quirks with cookies and localhost — behaviors can even be different from a browser to another —. If you're willing to try again, I would suggest you leave out those parameters and keep the default; which should work correctly. |
Beta Was this translation helpful? Give feedback.
-
Bottom Line: Even with a seemingly ideal setup, Fief self-hosted failed to support a simple logout and login to its own Admin page. "Invalid login session" would persist unless the entire postgres and redis volumes were wiped. Instead of investing more time, I'm shifting to KeyCloak for my self-hosted IAM service.
I really do hope this project gets to a better place to serve as a reference implementation of IAM in FastAPI if nothing else.
For any other new folks trying out Fief, I figured I'd share a couple of tips for a Docker Compose based self-hosted setup to hopefully save someone time.
docker-compose.yml
The mildly tweaked postgres Dockerfile to enable
expect
to enable auto creation of the Fief database and username if they don't exist prior to Fief starting upThe script to autocreate Fief database and user based on environment variables from .env. With the compose spec above, would need to be in
/postgres/scripts/init-fief-db.sh
relative to the docker-compose.yml.and finally, a draft .env file stored alongside docker-compose.yml
Beta Was this translation helpful? Give feedback.
All reactions