Sign in via Twitter (WIP).

This commit is contained in:
Ivan Tashkinov 2019-03-11 20:37:26 +03:00
commit 63ab61ed3f
9 changed files with 63 additions and 10 deletions

View file

@ -5,6 +5,11 @@
defmodule Pleroma.Web.Router do
use Pleroma.Web, :router
pipeline :browser do
plug(:accepts, ["html"])
plug(:fetch_session)
end
pipeline :api do
plug(:accepts, ["json"])
plug(:fetch_session)
@ -197,6 +202,13 @@ defmodule Pleroma.Web.Router do
post("/authorize", OAuthController, :create_authorization)
post("/token", OAuthController, :token_exchange)
post("/revoke", OAuthController, :token_revoke)
scope [] do
pipe_through(:browser)
get("/:provider", OAuthController, :request)
get("/:provider/callback", OAuthController, :callback)
end
end
scope "/api/v1", Pleroma.Web.MastodonAPI do