-
Notifications
You must be signed in to change notification settings - Fork 21
Home
David Whitlock edited this page May 20, 2017
·
21 revisions
Welcome to the Phauxth wiki!
Phauxth is an authentication library for Phoenix applications.
plug Phauxth.Authenticate
plug Phauxth.Remember
This needs to be called after plug Phauxth.Authenticate
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.
Phauxth.Confirm.verify(params, opts)
Phauxth.Confirm.PassReset.verify(params, opts)
To get started, go to the New project page.