spec/dummy/config/initializers/doorkeeper.rb in doorkeeper-5.1.0.rc2 vs spec/dummy/config/initializers/doorkeeper.rb in doorkeeper-5.1.0
- old
+ new
@@ -1,13 +1,15 @@
+# frozen_string_literal: true
+
Doorkeeper.configure do
# Change the ORM that doorkeeper will use.
orm DOORKEEPER_ORM
# This block will be called to check whether the resource owner is authenticated or not.
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.')
+ User.where(id: session[:user_id]).first || redirect_to(root_url, alert: "Needs sign in.")
end
# 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
@@ -64,10 +66,11 @@
# access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param
# Change the native redirect uri for client apps
# When clients register with the following redirect uri, they won't be redirected to any server and
# the authorization code will be displayed within the provider
- # The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
+ # The value can be any string. Use nil to disable this feature.
+ # When disabled, clients must provide a valid URL
# (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
#
# native_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
# Forces the usage of the HTTPS protocol in non-native redirect uris (enabled