diff --git a/lib/supabase/go_true/admin_handler.ex b/lib/supabase/go_true/admin_handler.ex index 4ca8cb4..c4fbf01 100644 --- a/lib/supabase/go_true/admin_handler.ex +++ b/lib/supabase/go_true/admin_handler.ex @@ -24,7 +24,7 @@ defmodule Supabase.GoTrue.AdminHandler do end def invite_user(%Client{} = client, email, %InviteUserParams{} = opts) do - headers = Fetcher.apply_client_headers(client, nil, %{"redirect_to" => opts.redirect_to}) + headers = Fetcher.apply_client_headers(client, client.conn.api_key, %{"redirect_to" => opts.redirect_to}) body = %{email: email, data: opts.data} client @@ -33,7 +33,7 @@ defmodule Supabase.GoTrue.AdminHandler do end def generate_link(%Client{} = client, %{type: _, redirect_to: redirect_to} = params) do - headers = Fetcher.apply_client_headers(client, nil, %{"redirect_to" => redirect_to}) + headers = Fetcher.apply_client_headers(client, client.conn.api_key, %{"redirect_to" => redirect_to}) client |> Client.retrieve_auth_url(@generate_link) @@ -41,7 +41,7 @@ defmodule Supabase.GoTrue.AdminHandler do end def create_user(%Client{} = client, params) do - headers = Fetcher.apply_client_headers(client) + headers = Fetcher.apply_client_headers(client, client.conn.api_key) client |> Client.retrieve_auth_url(@users) @@ -49,7 +49,7 @@ defmodule Supabase.GoTrue.AdminHandler do end def delete_user(%Client{} = client, id, params) do - headers = Fetcher.apply_client_headers(client) + headers = Fetcher.apply_client_headers(client, client.conn.api_key) body = %{should_soft_delete: params[:should_soft_delete] || false} uri = single_user_endpoint(id) @@ -59,7 +59,7 @@ defmodule Supabase.GoTrue.AdminHandler do end def get_user(%Client{} = client, id) do - headers = Fetcher.apply_client_headers(client) + headers = Fetcher.apply_client_headers(client, client.conn.api_key) uri = single_user_endpoint(id) client @@ -73,7 +73,7 @@ defmodule Supabase.GoTrue.AdminHandler do per_page: to_string(Map.get(params, :per_page, nil)) } - headers = Fetcher.apply_client_headers(client) + headers = Fetcher.apply_client_headers(client, client.conn.api_key) client |> Client.retrieve_auth_url(@users) @@ -87,7 +87,7 @@ defmodule Supabase.GoTrue.AdminHandler do end def update_user(%Client{} = client, id, params) do - headers = Fetcher.apply_client_headers(client) + headers = Fetcher.apply_client_headers(client, client.conn.api_key) uri = single_user_endpoint(id) client diff --git a/lib/supabase/go_true/plug.ex b/lib/supabase/go_true/plug.ex index 6eda149..06e8a31 100644 --- a/lib/supabase/go_true/plug.ex +++ b/lib/supabase/go_true/plug.ex @@ -119,7 +119,7 @@ defmodule Supabase.GoTrue.Plug do conn |> renew_session() - |> redirect(to: @not_authenticated_path ) + |> redirect(to: @not_authenticated_path) end diff --git a/lib/supabase/go_true/user_handler.ex b/lib/supabase/go_true/user_handler.ex index dbc009b..68a8cbc 100644 --- a/lib/supabase/go_true/user_handler.ex +++ b/lib/supabase/go_true/user_handler.ex @@ -182,7 +182,7 @@ defmodule Supabase.GoTrue.UserHandler do endpoint = Client.retrieve_auth_url(client, @resend_signup_uri) endpoint = append_query(endpoint, %{redirect_to: opts[:redirect_to]}) - with {:ok, _} <- Fetcher.post(endpoint, body, headers) |> IO.inspect() do + with {:ok, _} <- Fetcher.post(endpoint, body, headers) do :ok end end diff --git a/mix.exs b/mix.exs index c13b6d2..7c4c6f8 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule SupabaseAuth.MixProject do use Mix.Project - @version "0.3.6" + @version "0.3.7" @source_url "https://github.com/zoedsoupe/gotrue-ex" def project do