Skip to content

An isomorphic Elixir library for GoTrue

License

Notifications You must be signed in to change notification settings

zespere/gotrue-ex

 
 

Repository files navigation

Supabase GoTrue

Auth implementation for the supabase_potion SDK in Elixir.

Installation

def deps do
  [
    {:supabase_potion, "~> 0.3"},
    {:supabase_gotrue, "~> 0.2"}
  ]
end

Usage

Firstly you need to initialize your Supabase client(s) as can be found on the supabase_potion documentation:

iex> Supabase.init_client(%{name: Conn, conn: %{base_url: "<supa-url>", api_key: "<supa-key>"}})
{:ok, #PID<>}

Now you can pass the Client to the Supabase.GoTrue functions as a PID or the name that was registered on the client initialization:

iex> Supabase.GoTrue.sign_in_with_password(pid | client_name, %{} = params)

This implementation also exposes an Supaabse.GoTrue.Admin function to interact with users with super powers:

iex> Supabase.GoTrue.Admin.create_user(pid | client_name, %{} = params)

About

An isomorphic Elixir library for GoTrue

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 97.9%
  • Nix 1.1%
  • Other 1.0%