When I am adding the :auth pipe in the following code
scope "/", ApolloWeb do
pipe_through([:browser, :auth])
get("/.well-known/acme-job_opening/:id", LandingPageController, :letsencrypt)
resources("/", LandingPageController, only: [:index])
get("/admin/signup", AdminController, :new)
get("/attempt_exit", AttemptController, :exit)
get("/attempt_exit_mobile", AttemptController, :exit_mobile)
get("/submit", AttemptController, :test_submit)
get("/admin/request_demo", AdminController, :request_demo)
post("/admin/request_demo", AdminController, :send_request)
resources("/admin", AdminController, only: [:create])
get("/admin/login", AdminSessionController, :new)
post("/admin/session", AdminSessionController, :create)
get("/admin/forgot_password", AdminSessionController, :forgot_password)
post("/admin/forgot_password", AdminSessionController, :reset_password_email)
get("/admin/reset_password", AdminSessionController, :reset_password)
post("/admin/reset_password", AdminSessionController, :reset_password_confirmation)
# routes for addon_auth
get "/addon_auth", AdminSessionController, :addon_auth
post "/addon_auth", AdminSessionController, :create_addon
end
I am getting following error when hitting http://localhost:4000/admin/login
This page isn’t working
localhost redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
Even I am trying the following still, the Same error
scope "/", ApolloWeb do
pipe_through([:browser, :auth])
get("/admin/login", AdminSessionController, :new)
post("/admin/session", AdminSessionController, :create)
end
scope "/", ApolloWeb do
pipe_through(:browser)
get("/.well-known/acme-job_opening/:id", LandingPageController, :letsencrypt)
resources("/", LandingPageController, only: [:index])
get("/admin/signup", AdminController, :new)
get("/attempt_exit", AttemptController, :exit)
get("/attempt_exit_mobile", AttemptController, :exit_mobile)
get("/submit", AttemptController, :test_submit)
get("/admin/request_demo", AdminController, :request_demo)
post("/admin/request_demo", AdminController, :send_request)
resources("/admin", AdminController, only: [:create])
get("/admin/forgot_password", AdminSessionController, :forgot_password)
post("/admin/forgot_password", AdminSessionController, :reset_password_email)
get("/admin/reset_password", AdminSessionController, :reset_password)
post("/admin/reset_password", AdminSessionController, :reset_password_confirmation)
# routes for addon_auth
get "/addon_auth", AdminSessionController, :addon_auth
post "/addon_auth", AdminSessionController, :create_addon
end