Skip to content

v0.2.0

Choose a tag to compare

@danschultzer danschultzer released this 01 Mar 16:41

This release consists of breaking changes.

In previous Assent.Stategy.Slack strategy, the sub user id field consisted of {SUB}-{TEAM}. Slack has migrated to OpenID Connect, and the response has been conformed to OIDC. The sub will now only consists of the sub id, and not include team id. To succesfullly migrate to this release all slack identity records storing the sub user id field has to be updated.

If you wish to continue using the previous sub user id a custom OIDC strategy can be used instead:

defmodule Slack do
  use Assent.Strategy.OIDC.Base

  alias Assent.Strategy.Slack

  defdelegate default_config(config), to: Slack

  def normalize(config, user) do
    user = Map.put(user, "sub", "#{user["https://slack.com/user_id"]}-#{user["https://slack.com/team_id"]}")

    Slack.normalize(config, user)
  end
end
  • Assent.Strategy.OIDC.fetch_user/2 now removes the ID token specific keys from the user claims instead of normalizing #100
  • Assent.Strategy.OIDC.Base now adds normalize/2 to the macro that will include the full user claims in the user params #100
  • Assent.Stategy.Slack now uses OpenID connect instead of legacy OAuth 2.0, please note that the sub value may have changed #97