jdj_dk

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 :smile:

Marked As Solved

danschultzer

danschultzer

Pow Core Team

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

jdj_dk

How did I miss that :smile: Thank you so much for helping me. It seems to have solved the problem.

Where Next?

Popular in Discussions Top

jswny
I would like to better understand what the advantages/disadvantages of umbrella applications are compared to structuring your app as as s...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
axelson
Decided against including more info in the title, but the gist is that Plataformatec sponsored projects will continue with the assets bei...
New
sashaafm
Piggy backing a bit on @dvcrn topic BEAM optimization for functions with static return type?, I’ve been trying to understand in a deeper ...
New
fireproofsocks
This is more of a general question, but I’m wondering how other people in the community think about the pattern matching in function sign...
New
pillaiindu
I want to convert a Phoenix LiveView CRUD website to a CRUD mobile app. What do you think is the easiest way to do so?
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19204 150
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
kostonstyle
Hi all How can I compare haskell with elixir, included tools, webservices, ect. Thanks
New

Other popular topics Top

New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement