This is a full rewrite of the library, and are several breaking changes. You're encouraged to test your app well if you upgrade from 0.4.x.
Read the ExOauth2Provider CHANGELOG.md for upgrade instructions.
Routes are now separated into api and non api routes. Update your routes like so:
defmodule MyAppWeb.Router do
use MyAppWeb, :router
use PhoenixOauth2Provider.Router
# ...
pipeline :protected do
# Require user authentication
end
scope "/" do
pipe_through :api
oauth_api_routes()
end
scope "/" do
pipe_through [:browser, :protected]
oauth_routes()
end
# ...
end
Update :module
to :web_module
in your configuration. Templates and views are no longer required to be generated so you can remove them entirely if the default ones work for you.