Module: Devise::Oauth2Authenticatable::Helpers

Defined in:
lib/devise_oauth2_authenticatable/view_helpers.rb

Overview

OAuth2 view helpers to easily add the link to the OAuth2 connection popup and also the necessary JS code.

Instance Method Summary collapse

Instance Method Details

Creates the link to



12
13
14
15
16
17
18
19
20
21
# File 'lib/devise_oauth2_authenticatable/view_helpers.rb', line 12

def link_to_oauth2(link_text, options={})
  
  
   = Devise::(request,::Devise.mappings[:user])

  link_to link_text, Devise::oauth2_client.web_server.authorize_url(
      :redirect_uri => ,  
      :scope => Devise::requested_scope
    ), options
end