PlugParadoxAuth

A plug to authenticate paradox admins. Currently supports:

Installation

The package can be installed by adding plug_paradox_auth to your list of dependencies in mix.exs:

def deps do
  [
    {:plug_paradox_auth, "~> 0.2.2"}
  ]
end

Example use in a Phoenix Router

  use PlugParadoxAuth

  scope :admin do
    plug GoogleAuthCheck # checks for existing auth and redirects to google auth if nil

    forward "/auth/google/callback", GoogleAuthSet # forward must be defined for the google callback after auth. This will set the session and redirect the user
  end