Displaying 1 result from an estimated 1 matches for "find_for_accounts_oauth".
2010 Sep 17
0
ruby's oauth2 grant_type
...eloped both client and server and on request for
access_token i see no grant_type parameter. My code from client callback
controller
class CallbackController < Devise::OauthCallbacksController
  def accounts
    access_token = accounts_config.access_token_by_code(params[:code])
    @user = User.find_for_accounts_oauth(access_token,
signed_in_resource)
    if @user.persisted? && @user.errors.empty?
      sign_in @user
      set_oauth_flash_message :notice, :success
      redirect_to after_oauth_success_path_for(@user) #=> redirects to
user_root_path or root_path
    else
      session[:user_accounts_o...