vrajasekhar1
Hi all,
How long is Pow renewal_token valid? Access_token seems expiring after 30mins, however, I am able to renew access token using renewal token even after a long time as well.
How long a renewal token is valid?
Also, is there a way to configure how long Access and renewal tokens are valid?
Thanks,
Rajasekhar.
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security











Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Schultzer
Pow is well documented, if you are using the Pow.Plug.Session, then you can find information on that here Pow.Plug.Session — Pow v1.0.39
You have two configuration, session renewal, and the credential cache ttl.
tomalexhughes
To elaborate on @Schultzer’s answer.
The PowPersistentSession.Plug.Base documentation specifies the following:
See this post by @danschultzer for more information.
vrajasekhar1
Thanks, tomalexhughes.
If I understand this correctly,
Is my understanding is correct? If not, please correct me.
Also, few observations about the following.
session_ttl_renewal - I am confused about the documentation for this.
Finally, with Pow when I stop the phx.server, all the tokens(both access_token and renewal_token) become invalid. However with Guardian, I used to see that jwt token was valid even after restarting phx.server. Is that the expected behaviour with Pow and Guardian accordingly?
tomalexhughes
I think so, I’m still learning myself but that is the conclusion I came too.
I haven’t used Guardian so I cannot comment on that but I have found this section of the Pow documentation that states the following:
I presume this is why tokens are lost between server restarts.
For your remaining questions I don’t have the answers as I’m still learning.
vrajasekhar1
Thanks tomalexhughes, for your useful insights and references.
tomalexhughes
Just one more thing that I’ve picked up on whilst experimenting, my above comment regarding PowPersistentSession.Plug.Base does not apply if you follow the How to use Pow in an API tutorial. This is because that tutorial has you create a custom plug.
However, the custom plug in that tutorial does have us making use of
PowPersistentSession.Store.PersistentSessionCachewhich usesPow.Store.Base. This module does some funky stuff with macros to dynamically add theput/3method toPowPersistentSession.Store.PersistentSessionCache.The
put/3method is called within our custom plug when creating a new renewal token. To configure the TTL on the renewal token I just modified the config passed, like so:There’s still a few things I am unclear on. Firstly I am not sure whether what I am doing is best practice. Secondly, I’m not sure where the TTL is actually stored; I presume the TTL is part of the metadata of each token and therefore each token could have a different TTL.
This is all based off Pow 1.0.20.