Changelog
v0.3.2 (2019-08-25)
- All links in docs generated with
mix docs
and on hexdocs.pm now works - Generated docs now uses lower case file name except for
README
andCHANGELOG
- Added Auth0 strategy
- Added Gitlab strategy
v0.3.1 (2019-06-05)
- Added Pow minimum requirement
~> 1.0.9
- Added repo
:prefix
support User identities are now upserted on authorization so additional params can be updated on authorization request. Following methods has been deprecated:
PowAssent.Ecto.UserIdentities.Context.create/3
in favor ofPowAssent.Ecto.UserIdentities.Context.upsert/3
MyApp.UserIdentities.create/2
in favor ofMyApp.UserIdentities.upsert/2
MyApp.UserIdentities.pow_assent_create/2
in favor ofMyApp.UserIdentities.upsert/2
PowAssent.Operations.create/3
in favor ofPowAssent.Operations.upsert/3
PowAssent.Plug.create_identity/2
in favor ofPowAssent.Plug.upsert_identity/2
- Use
Pow.Plug.get_plug/1
instead of pulling:mod
from the config Fixed so
uid
can be an integer value inPowAssent.Ecto.UserIdentities.Context
. Strategies are no longer expected to convert theuid
value to binary. The following methods will accepts integeruid
:- Fixed bug where invited user was not signed in after succesful authorization
- Fixed bug where releases with Elixir 1.9.0 didn't have
:httpc
available
v0.3.0 (2019-05-19)
- Added
PowAssent.Phoenix.ViewHelpers.authorization_link/2
andPowAssent.Phoenix.ViewHelpers.deauthorization_link/2
- Removed
PowAssent.Phoenix.ViewHelpers.provider_link/3
Rewritten plug methods and controller handling so they now pass through additional params such as access token. This makes it possible to e.g. capture access tokens. Now there is a clear distinction between user identity params and user params, and most methods now accepts or returns two separate params. Following methods updated:
MyApp.UserIdentities.create/3
changed toMyApp.UserIdentities.create/2
MyApp.UserIdentities.pow_assent_create/3
changed toMyApp.UserIdentities.pow_assent_create/2
PowAssent.Ecto.UserIdentities.Context.create/4
changed toPowAssent.Ecto.UserIdentities.Context.create/3
MyApp.UserIdentities.create_user/4
changed toMyApp.UserIdentities.create_user/3
MyApp.UserIdentities.pow_assent_create_user/4
changed toMyApp.UserIdentities.pow_assent_create_user/3
PowAssent.Ecto.UserIdentities.Context.create_user/5
changed toPowAssent.Ecto.UserIdentities.Context.create_user/4
PowAssent.Operations.create/4
changed toPowAssent.Operations.create/3
PowAssent.Operations.create_user/5
changed toPowAssent.Operations.create_user/4
PowAssent.Plug.callback/4
now returns a tuple with{:ok, user_identity_params, user_params, conn}
PowAssent.Plug.authenticate/3
changed toPowAssent.Plug.authenticate/2
PowAssent.Plug.create_identity/3
changed toPowAssent.Plug.create_identity/2
PowAssent.Plug.create_user/4
now acceptsuser_identity_params
instead ofprovider
as second argumentPowAssent.Plug.create_user/4
now expectsuser_identity_params
rather thanprovider
as second argument
v0.2.4 (2019-04-25)
- Fixed so OAuth 2.0 access token request params are in the POST body in accordance with RFC 6749
v0.2.3 (2019-04-09)
- Added
:authorization_params
config option toPowAssent.Strategy.OAuth
- Plug and Phoenix controller now handles
:session_params
rather than:state
for any params that needs to be stored temporarily during authorization - Added handling of
oauth_token_secret
to OAuth strategies - Support any
:plug
version below2.0.0
- Fixed bug in
mix pow_assent.ecto.gen.migration
task where--binary-id
flag didn't generate correct migration - Support
:pow
version1.0.5
v0.2.2 (2019-03-25)
- Fixed issue where user couldn't be created when PowEmailConfirmation was enabled
v0.2.1 (2019-03-16)
- Improve mix task instructions
v0.2.0 (2019-03-09)
Changes
- Detached
Plug
from strategies - Moved callback registration/session logic from plug to controllers
- Allow for disabling registration by setting just
pow_assent_authorize_routes/0
macro in router - Ensure only
:pow_assent_params
session value only can be read with the same provider param used for the callback token
now included inPowAssent.Strategy.OAuth.callback/2
response- Use
account_already_bound_to_other_user/1
message for already taken user identity inPowAssent.Phoenix.RegistrationController
Update your custom strategies
Strategies no longer has access to a Plug.Conn
struct. If you use a custom strategy, please update it so it reflects this setup:
defmodule TestProvider do
@behaviour PowAssent.Strategy
@spec authorize_url(Keyword.t()) :: {:ok, %{url: binary()}} | {:error, term()}
def authorize_url(config) do
# Generate authorization url
end
@spec callback(Keyword.t(), map()) :: {:ok, %{user: map()}} | {:error, term()}
def callback(config, params) do
# Handle callback response
end
end
v0.1.0 (2019-02-28)
- Initial release