Supabase. Auth. Schemas. OAuth. ConsentResponse
(supabase_auth v1.0.1)
View Source
Schema for OAuth consent response using schemaless changesets.
Contains the redirect URL to continue the OAuth flow after the user approves or denies the authorization request.
Examples
%{
redirect_url: "https://app.com/callback?code=abc123..."
}
Summary
Functions
Parses OAuth consent response from API response.
Types
@type t() :: %{redirect_url: String.t()}
Functions
@spec parse(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
Parses OAuth consent response from API response.
Returns {:ok, map} with parsed consent response or {:error, changeset} if validation fails.
Examples
iex> ConsentResponse.parse(%{
...> "redirect_url" => "https://app.com/callback?code=abc123"
...> })
{:ok, %{redirect_url: "https://app.com/callback?code=abc123"}}
iex> ConsentResponse.parse(%{})
{:error, %Ecto.Changeset{}}