Browse Source

fixed oauth2 code授权方式登录

pull/313/head
xiaoxiaoqiong 4 years ago
parent
commit
959191c8bb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      config/initializers/doorkeeper.rb

+ 1
- 1
config/initializers/doorkeeper.rb View File

@@ -10,7 +10,7 @@ Doorkeeper.configure do
# raise "Please configure doorkeeper resource_owner_authenticator block located in #{__FILE__}"
# Put your resource owner authentication logic here.
# Example implementation:
User.find_by(id: session[:www_user_id]) || redirect_to(new_user_session_url)
User.find_by(id: session[:www_user_id]) || User.find_by(login: params[:auth]) || redirect_to("/oauth2?call_url=#{request.fullpath}")
end

resource_owner_from_credentials do |routes|


Loading…
Cancel
Save