Class: OmniAuth::Strategies::Fullscreen

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/fullscreen.rb

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject

You can pass state param to the auth request, if you need to set them dynamically. You can also set these options in the OmniAuth config :authorize_params option.

/auth/fullscreen?state=ABC



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/omniauth/strategies/fullscreen.rb', line 24

def authorize_params
  super.tap do |params|
    %w[state].each do |v|
      if request.params[v]
        params[v.to_sym] = request.params[v]

        # to support omniauth-oauth2's auto csrf protection
        session['omniauth.state'] = params[:state] if v == 'state'
      end
    end
  end
end

#user_infoObject



53
54
55
# File 'lib/omniauth/strategies/fullscreen.rb', line 53

def 
  @raw_info ||= @access_token.get("/auth/user.json").parsed
end