Pow v1.0.22 Release Notes
Release Date: 2021-01-27 // about 3 years ago-
🚀 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 - [
PowPersistentSession.Plug.Base
] Now includes:pow_config
in the store config - [
PowResetPassword.Plug
] Now includes:pow_config
in the store config - [
Pow.Plug.Base
] Now includes:pow_config
in the store config - [
Pow.Operations
] AddedPow.Operations.reload/2
to reload structs - ⚡️ [
PowPersistentSession.Store.PersistentSessionCache
] UpdatePowPersistentSession.Store.PersistentSessionCache.get/2
to reload the user usingPow.Operations.reload/2
- 🔧 [
Pow.Store.CredentialsCache
] Now supportreload: true
configuration so once fetched from the cache the user object will be reloaded through the context module
📚 Documentation
- ⚡️ Updated the [API guide](guides/api.md) as it's no longer necessary to load the user struct
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 yourAPIAuthPlug
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. ThePowPersistentSession.Store.PersistentSessionCache
has fallback logic to handle the deprecated clauses keyword list, and will load the user correctly. - [