Now the plug in the above issue can be reduced to just this:
defmodule MyAppWeb.PowAssent.UpdateProviderConfig do
def init(opts), do: opts
def call(conn, _opts) do
updated_config = [authorization_params: [domain: conn.params["domain"]]]
PowAssent.Plug.merge_provider_config(conn, :auth0, updated_config)
end
end
The config will be deep merged. I'm not sure if this is the proper behavior instead of overriding the config values. It should probably also merge with default config in the provider.
Resolves https://github.com/pow-auth/pow_assent/issues/117#issuecomment-571837184
Now the plug in the above issue can be reduced to just this:
The config will be deep merged. I'm not sure if this is the proper behavior instead of overriding the config values.
It should probably also merge with default config in the provider.