v1.0.22
This release introduces a deprecation for the default API guide implementation. Please check migration section below.
Enhancements
- [
PowPersistentSession.Plug.Cookie
] Now stores the user struct instead of clauses #392 - [
PowPersistentSession.Plug.Base
] Now includes:pow_config
in the store config #392 - [
PowResetPassword.Plug
] Now includes:pow_config
in the store config #392 - [
Pow.Plug.Base
] Now includes:pow_config
in the store config #392 - [
Pow.Operations
] AddedPow.Operations.reload/2
to reload structs #392 - [
PowPersistentSession.Store.PersistentSessionCache
] UpdatePowPersistentSession.Store.PersistentSessionCache.get/2
to reload the user usingPow.Operations.reload/2
#392 - [
Pow.Store.CredentialsCache
] Now supportreload: true
configuration so once fetched from the cache the user object will be reloaded through the context module #392
Documentation
Migration
If you've used an API setup for previous version, you'll see the warning PowPersistentSession.Store.PersistentSessionCache.get/2 call without `:pow_config` in second argument is deprecated, refer to the API guide.
. It's recommended to replace your APIAuthPlug
with the updated version in the API guide.
The larger refactor of cache setup in Pow v1.0.22
means that user struct is always expected to be passed in and returned by the stores, so it is no longer necessary to load the user in the API plug. The PowPersistentSession.Store.PersistentSessionCache
has fallback logic to handle the deprecated clauses keyword list, and will load the user correctly.