With #66 everything but the userinfo claims was passed on. It makes sense to have access to those claims too though. Now you'll be able to do this:
# lib/my_app/user_identities/user_identity.ex
defmodule MyApp.UserIdentities.UserIdentity do
use Ecto.Schema
use PowAssent.Ecto.UserIdentities.Schema,
user: MyApp.Users.User
schema "user_identities" do
field :name, :string
pow_assent_user_identity_fields()
timestamps()
end
def changeset(user_identity_or_changeset, attrs) do
userinfo_params = Map.get(attrs, "userinfo", %{})
user_identity_or_changeset
|> pow_assent_changeset(attrs)
|> Ecto.Changeset.cast(userinfo_params, [:name])
end
end
With #66 everything but the userinfo claims was passed on. It makes sense to have access to those claims too though. Now you'll be able to do this: