-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Hi, am new to that language, framework and topic.
I want to upgrade an existing minimal app to work with OAuth and failed with:
mix compile
Compiling 2 files (.ex)
warning: variable "conn" is unused (there is a variable with the same name in the context, use the pin operator (^) to match on it or prefix this variable with underscore if it is not meant to be used)
lib/pcm_limit_classes_web/controllers/auth_controller.ex:125: PcmLimitClassesWeb.AuthController.valid_state_token?/2
== Compilation error in file lib/pcm_limit_classes_web/router.ex ==
** (CompileError) lib/pcm_limit_classes_web/router.ex:1: undefined function redirect_if_authenticated/2 (expected PcmLimitClassesWeb.Router to define such a function or for it to be imported, but none are available)
how to resolve this :redirect_if_authenticated in the router file ? ..
# Routes in lib/my_app_web/router.ex
scope "/auth", MyAppWeb do
pipe_through [:browser, :redirect_if_authenticated]
get "/google", AuthController, :request
get "/google/callback", AuthController, :callback
get "/logout", AuthController, :logout
end
Metadata
Metadata
Assignees
Labels
No labels