-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,6 +212,28 @@ defmodule Supabase.GoTrue do | |
end | ||
end | ||
|
||
@doc """ | ||
Resends a signuo confirm email for the given email address. | ||
## Parameters | ||
- `client` - The `Supabase` client to use for the request. | ||
- `email` - A valid user email address to recover password | ||
- `opts`: | ||
- `redirect_to`: the url where the user should be redirected to reset their password | ||
- `captcha_token` | ||
## Examples | ||
iex> Supabase.GoTrue.resend(client, "[email protected]", redirect_to: "http://localohst:4000/reset-pass") | ||
:ok | ||
""" | ||
@spec resend(Client.client(), String.t, opts) :: :ok | {:error, term} | ||
when opts: [redirect_to: String.t] | [captcha_token: String.t] | [redirect_to: String.t, captcha_token: String.t] | ||
def resend(client, email, opts) when is_client(client) do | ||
with {:ok, client} <- Client.retrieve_client(client) do | ||
UserHandler.resend_signup(client, email, Map.new(opts)) | ||
end | ||
end | ||
|
||
@doc """ | ||
Updates the current logged in user. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters