Skip to content

zubairshokh/phauxth-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phauxth authentication example Phoenix app

An example Phoenix app using the Phauxth authentication library.

You can clone this repository and use the app as it is, or you can generate it using the Phauxth installer.

Cloning this repo and using the app

  1. Run the following commands:
git clone https://github.com/riverrun/phauxth-example.git
cd phauxth-example
  1. Get dependencies:
mix deps.get
  1. Build the javascript assets:
(cd assets && npm install && node node_modules/brunch/bin/brunch build)
  1. Set up the database:
mix ecto.setup
  1. Set up the bamboo email library (see below)

Using the Phauxth installer

  1. Install the Phauxth installer and run phauxth.new:
mix archive.install https://github.com/riverrun/phauxth_installer/raw/master/archives/phauxth_new.ez
mix phx.new forks_the_egg_sample # or any other suitable app name
cd forks_the_egg_sample
mix phauxth.new --confirm --remember --no-backups
  1. Get dependencies:
mix deps.get
  1. Set up the database:
mix ecto.setup
  1. Set up the bamboo email library (see below)

Setting up bamboo email library

The bamboo email library is configured in the config/config.exs, using the LocalAdapter, and config/test.exs, using the TestAdapter, files.

The LocalAdapter is great for development, but to actually send emails to users, you will need to setup a different adapter. For more information about the available adapters, see the bamboo README.

Useful commands

  • To start your Phoenix server, run mix phx.server or iex -S mix phx.server
  • To run tests, run mix test
  • To reset the database, run mix ecto.reset

About

An example of a Phoenix app using the excellent Phauxth authentication library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 84.9%
  • HTML 9.2%
  • JavaScript 5.8%
  • CSS 0.1%