README.md
# PlugParadoxAuth
A plug to authenticate paradox admins. Currently supports:
- Google auth
## Installation
The package can be installed by adding `plug_paradox_auth` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:plug_paradox_auth, "~> 0.2.1"}
]
end
```
## Example use in a Phoenix Router
```elixir
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
```