Skip to content

Commit

Permalink
ripped out old auth code and added auth_plug. most tests fail (to be …
Browse files Browse the repository at this point in the history
…expected) ... fixing now. #65
  • Loading branch information
nelsonic committed Sep 30, 2020
1 parent c3259ca commit 2d802dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/app_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ defmodule AppWeb.Router do
plug :accepts, ["json"]
end

pipeline :person do
plug :authenticate_person
end
pipeline :auth_optional, do: plug(AuthPlugOptional, %{})

scope "/", AppWeb do
pipe_through :browser
pipe_through [:browser, :auth_optional]

get "/", PageController, :index
post "/register", PageController, :register
get "/auth/google/callback", GoogleAuthController, :index
end

pipeline :auth, do: plug(AuthPlug, %{auth_url: "https://dwylauth.herokuapp.com"})

scope "/", AppWeb do
pipe_through [:browser, :person]
pipe_through [:browser, :auth]

# person information
get "/people/info", PersonController, :info
Expand Down

0 comments on commit 2d802dc

Please sign in to comment.