How do I keep my token in session?

These are not comments that will engage the community to help you because:

  • You haven’t shown us what you did.
  • You seem to have not researched the suggested solutions. You would know that if you do put_session then obviously you should also call get_session wherever mandated by your expected workflow as @NobbZ pointed out. Did you read the docs of Plug.Conn.put_session? And get_session’s?
  • You don’t seem to have researched existing auth solutions. F.ex., have you looked at Pow? You could actually fully use that with just one single customisation (namely your way of fetching a token). Pow can do everything else.
  • Did you try searching this forum for “put_session”? Like this?

People in this forum are willing to help but not if you are responding with a single sentence. Be more specific and show us what you tried.

2 Likes