Customized more doorkeeper views, only logged in users can create oauth apps
This commit is contained in:
parent
aab9f57e36
commit
1aa477ac2f
16 changed files with 234 additions and 102 deletions
|
@ -14,18 +14,16 @@ Doorkeeper.configure do
|
|||
end
|
||||
|
||||
# If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
|
||||
# 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
|
||||
admin_authenticator do
|
||||
current_user || redirect_to(new_user_session_url)
|
||||
end
|
||||
|
||||
# Authorization Code expiration time (default 10 minutes).
|
||||
# authorization_code_expires_in 10.minutes
|
||||
|
||||
# Access token expiration time (default 2 hours).
|
||||
# If you want to disable expiration, set this to nil.
|
||||
# access_token_expires_in 2.hours
|
||||
# access_token_expires_in nil
|
||||
|
||||
# Assign a custom TTL for implicit grants.
|
||||
# custom_access_token_expires_in do |oauth_client|
|
||||
|
|
|
@ -49,7 +49,5 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
get '/mentions', to: 'home#mentions', as: :mentions
|
||||
|
||||
root 'home#index'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue