Skip to content

v1.0.22

Compare
Choose a tag to compare
@danschultzer danschultzer released this 27 Jan 23:12
07055a3

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] Added Pow.Operations.reload/2 to reload structs #392
  • [PowPersistentSession.Store.PersistentSessionCache] Update PowPersistentSession.Store.PersistentSessionCache.get/2 to reload the user using Pow.Operations.reload/2 #392
  • [Pow.Store.CredentialsCache] Now support reload: true configuration so once fetched from the cache the user object will be reloaded through the context module #392

Documentation

  • Updated the API guide as it's no longer necessary to load the user struct #574

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.