Skip to content

Releases: workos/workos-elixir

v1.1.0

29 Aug 19:24
4846da2
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.0.0...v1.1.0

v1.0.0

20 Dec 12:25
e979826
Compare
Choose a tag to compare

Description

This is the first major release of the WorkOS Elixir SDK, it introduces all of the core APIs from WorkOS released until this moment and provides better configuration support for applications.

However, it'll remain as an experimental SDK since we don't have plans to keep it up to date across core product API changes.

Breaking changes compared to previous minor versions

Response structs

For matching clauses like this one:

case WorkOS.Organizations.get_organization(org_id) do
      {:ok,
       %{
         "id" => id,
         "name" => name
       }} 

It might result in a similar "no clause matching" error:

CleanShot 2023-12-09 at 23 43 59

Responses now have their structs that are parsed from the JSON responses. For instance, here's how to perform matching on the result of get_organization with response structs:

{:ok, %WorkOS.Organizations.Organization{id: id}} =
  WorkOS.Organizations.get_organization("org_123")

You may also encounter errors regarding Access Behaviour on Structs.

Configuration

Introducing a new configuration option: :client, by default, this library uses Tesla but it can be replaced according to the WorkOS.Client module behavior.

However, as previously, the only required config options are :api_key and :client_id.

You can also create a client struct separately, and pass it to each method.

client = WorkOS.client(api_key: System.fetch_env!("WORKOS_API_KEY"), client_id: System.fetch_env!("WORKOS_CLIENT_ID"))

WorkOS.Organizations.get_organization(client, "org_123")

Note that if you choose to configure WorkOS in your app config, passing a client struct is always optional.

config :workos, WorkOS.Client,
      api_key: "sk_12345",
      client_id: "project_12345"

Removed

  • Removed deprecated domain option from WorkOS.SSO.get_authorization_url, organization should be used instead.

Added

We're introducing new API modules according to our latest features:

v0.4.0

13 Nov 14:18
2c03fe0
Compare
Choose a tag to compare

Fixed

  • Fixed a bug in create_session causing the expires_in to not be passed in properly #35

v0.3.0

08 Mar 16:28
Compare
Choose a tag to compare

Added

  • Added Webhooks module to validate webhook requests #28

Fixed

  • Fixed a bug in get_profile causing the access_token to not be passed in properly #29

v0.2.0

23 Dec 15:49
ae2aa52
Compare
Choose a tag to compare

Added

  • Added Audit Logs module (#18)
  • Added MFA module (#22)
  • Added CI Pipeline (#23 and #24)

Updated

  • Minor code improvements (#14)
  • Refactored Portal module and added Organizations module (#17)
  • Updated SSO module (#19)
  • Updated Directory Sync module (#25)

Fixed

  • Converted organization to organization_id in Audit Logs module (#20)
  • Fixed usage of opts in API and SSO modules (#21)

v0.1.1

12 Feb 18:00
261122f
Compare
Choose a tag to compare
v0.1.1 Pre-release
Pre-release
  • Updated the configuration to support auto-generating docs for the hex package

v0.1.0

10 Feb 19:07
261122f
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release

This is an initial beta version release.

This includes support for:

  • Passwordless
  • SSO
  • Portal
  • Directory Sync

v0.1.3

17 May 19:30
Compare
Choose a tag to compare
  • Added delete directory method (#3)
  • Upgradeed hackney and add delete organization in (#5)
  • Added connection param to passwordless (#7)
  • Fixed test warning and update deps (#9)

v0.1.2

20 Apr 18:25
d6f73d3
Compare
Choose a tag to compare
  • Added connection to get_authorization_url (#1)