spec/dummy/config/initializers/doorkeeper.rb in doorkeeper-5.0.0.rc1 vs spec/dummy/config/initializers/doorkeeper.rb in doorkeeper-5.0.0.rc2
- old
+ new
@@ -6,10 +6,14 @@
resource_owner_authenticator do
# Put your resource owner authentication logic here.
User.where(id: session[:user_id]).first || redirect_to(root_url, alert: 'Needs sign in.')
end
- # If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
+ # If you didn't skip applications controller from Doorkeeper routes in your application routes.rb
+ # file then you need to declare this block in order to restrict access to the web interface for
+ # adding oauth authorized applications. In other case it will return 403 Forbidden response
+ # every time somebody will try to access the admin web interface.
+ #
# admin_authenticator do
# # Put your admin authentication logic here.
# # Example implementation:
# Admin.find_by_id(session[:admin_id]) || redirect_to(new_admin_session_url)
# end