From e76cd01b456bc338967c8f2ab527451c7567bd30 Mon Sep 17 00:00:00 2001 From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com> Date: Sat, 21 Oct 2023 21:43:57 -0300 Subject: [PATCH] Add livebook file --- workos_elixir.livemd | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 workos_elixir.livemd diff --git a/workos_elixir.livemd b/workos_elixir.livemd new file mode 100644 index 0000000..f9e3750 --- /dev/null +++ b/workos_elixir.livemd @@ -0,0 +1,18 @@ +# WorkOS + Elixir + +```elixir +Mix.install([ + {:workos, "~> 1.0.0"}, + {:kino, "~> 0.9.4"} +]) +``` + +## Create a client + +To start using WorkOS, create a `client` with the API key and client ID that you copy via the WorkOS Dashboard: + +```elixir +client = WorkOS.client(api_key: System.fetch_env!("WORKOS_API_KEY"), client_id: System.fetch_env!("WORKOS_CLIENT_ID")) +``` + +Note that if you choose to configure WorkOS in your app config, passing a client struct is always optional.