WorkOS.SSO.Logout (WorkOS SDK for Elixir v3.0.1)

Copy Markdown View Source

End-to-end SSO logout: authorizes a short-lived logout token via WorkOS.SSO.authorize_logout/3, then builds the logout redirect URL.

{:ok, url} = WorkOS.SSO.Logout.get_logout_url(client, %{profile_id: "prof_..."})

For the individual pieces, see WorkOS.SSO.authorize_logout/3 and WorkOS.SSO.get_logout_url/2.

Summary

Functions

Runs the logout flow and returns the redirect URL to send the user to.

Functions

get_logout_url(client, params, opts \\ [])

@spec get_logout_url(WorkOS.Client.t(), map(), keyword()) ::
  {:ok, String.t()} | {:error, WorkOS.Error.error()}

Runs the logout flow and returns the redirect URL to send the user to.

Parameters

  • params — map with :profile_id (the profile to log out) and optionally :return_to (post-logout redirect)