jdj_dk
Pow mnesia persistent sessions does not keep me logged in
Hi All
I can’t seem to get persistent sessions working in POW. I’ve created a boilerplate repo with my setup (Here’s the link to a list of files changed related to POW configuration Github repo
I’ve configured it with mnesia, and I’ve set the mnesia path to a fixed path, and it seems to write data to that path. I’ve tried to follow the guides on making the system production-ready.
I am not showing a checkbox in the login template. As I understand, it is not necessary.
This happens both in dev mode and in prod mode.
Can anybody spot what is going on? I’m using it on multiple apps, and they all suffer from the same problem.
Thanks in advance ![]()
Marked As Solved
danschultzer
You’re missing the controller callbacks:
config :phoenix_boilerplate, :pow,
user: PhoenixBoilerplate.Users.User,
repo: PhoenixBoilerplate.Repo,
cache_store_backend: Pow.Store.Backend.MnesiaCache,
extensions: [PowPersistentSession],
controller_callbacks: Pow.Extension.Phoenix.ControllerCallbacks
Without it, the callbacks in the PowPersistentSession extension isn’t called when users sign in or register so that’s why the session doesn’t persist.
Also Liked
jdj_dk
How did I miss that
Thank you so much for helping me. It seems to have solved the problem.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









