GoTrue (gotrue v0.2.1) View Source

Elixir wrapper for the GoTrue authentication service.

Link to this section Summary

Functions

Get user info using a valid JWT

Invite a new user to join

Send a password recovery email

Refresh access token using a valid refresh token

Send a magic link (passwordless login)

Get environment settings for the server

Sign in with email and password

Sign out user using a valid JWT

Sign up a new user with email and password

Update user info using a valid JWT

Generate a URL for authorizing with an OAUTH2 provider

Link to this section Functions

Link to this function

client(base_url, api_key)

View Source

Specs

get_user(String.t()) :: {:ok, map()} | {:error, map()}

Get user info using a valid JWT

Specs

invite(%{email: String.t(), data: map()}) :: map()

Invite a new user to join

Link to this function

invite(client, invitation)

View Source

Specs

recover(String.t()) :: :ok | {:error, map()}

Send a password recovery email

Link to this function

refresh_access_token(refresh_token)

View Source

Specs

refresh_access_token(String.t()) :: {:ok, map()} | {:error, map()}

Refresh access token using a valid refresh token

Link to this function

refresh_access_token(client, refresh_token)

View Source

Specs

send_magic_link(String.t()) :: :ok | {:error, map()}

Send a magic link (passwordless login)

Link to this function

send_magic_link(client, email)

View Source

Specs

settings() :: map()

Get environment settings for the server

Specs

sign_in(%{email: String.t(), password: String.t()}) ::
  {:ok, map()} | {:error, map()}

Sign in with email and password

Link to this function

sign_in(client, credentials)

View Source

Specs

sign_out(String.t()) :: :ok | {:error, map()}

Sign out user using a valid JWT

Specs

sign_up(%{
  email: String.t(),
  password: String.t(),
  data: map(),
  audience: String.t(),
  provider: String.t()
}) :: map()

Sign up a new user with email and password

Link to this function

sign_up(client, credentials)

View Source
Link to this function

update_header(client, arg2)

View Source

Specs

update_user(String.t(), map()) :: {:ok, map()} | {:error, map()}

Update user info using a valid JWT

Link to this function

update_user(client, jwt, info)

View Source
Link to this function

url_for_provider(provider)

View Source

Specs

url_for_provider(String.t()) :: String.t()

Generate a URL for authorizing with an OAUTH2 provider

Link to this function

url_for_provider(base_url, provider)

View Source