Introduce device flow

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-02-21 14:50:09 +01:00
parent 2ee329ff7b
commit b6875f6a4b
19 changed files with 833 additions and 47 deletions

View File

@@ -210,6 +210,17 @@ defmodule Mobilizon.Web.Router do
get("/oauth/authorize", ApplicationController, :authorize)
post("/oauth/token", ApplicationController, :generate_access_token)
get("/oauth/autorize_approve", PageController, :authorize)
get("/login/device", PageController, :auth_device)
end
pipeline :login do
plug(:accepts, ["html", "json"])
end
scope "/login", Mobilizon.Web do
pipe_through(:login)
post("/device/code", ApplicationController, :device_code)
end
scope "/proxy/", Mobilizon.Web do