Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit 6d5c0d59 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Change route for google callback api

parent 894f5bde
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,10 @@ defmodule DiskuyWeb.Router do
plug DiskuyWeb.Auth.Pipeline
end
pipeline :auth_token do
plug DiskuyWeb.Auth.PipelineAuthToken
end
pipeline :api do
plug CORSPlug, origin: "*"
plug :accepts, ["json"]
......@@ -53,10 +57,10 @@ defmodule DiskuyWeb.Router do
end
scope "api/auth/google", DiskuyWeb do
pipe_through :api
get "/callback", UserController, :callback
options "/callback", UserController, :options
scope "/api/auth", DiskuyWeb do
pipe_through [:api, :auth_token]
get "/google/callback", UserController, :callback
options "/google/callback", UserController, :options
end
# Enables LiveDashboard only for development
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment