Skip to content
David Whitlock edited this page May 20, 2017 · 21 revisions

Welcome to the Phauxth wiki!

Phauxth is an authentication library for Phoenix applications.

Authentication

plug Phauxth.Authenticate

Remember me

plug Phauxth.Remember

This needs to be called after plug Phauxth.Authenticate

Login and One-time passwords

To login, add the following verify/2 function to the login function:

case Phauxth.Login.verify(params, opts) do
  {:ok, user} -> handle_successful_login
  {:error, message} -> handle_error
end

For logging in with one-time passwords, which are often used with two-factor authentication, use Phauxth.Otp.verify/2. This function is called the same way as the Phauxth.Login.verify/2 function above.

User confirmation

Phauxth.Confirm.verify(params, opts)

Phauxth.Confirm.PassReset.verify(params, opts)

Starting a new project

To get started, go to the New project page.

Clone this wiki locally