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:
def deps do
[
{:plug_paradox_auth, "~> 0.2.2"}
]
endExample 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