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
-
#link_to_oauth2(link_text, options = {}) ⇒ Object
Creates the link to.
Instance Method Details
#link_to_oauth2(link_text, options = {}) ⇒ Object
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, ={}) session_sign_in_url = Devise::session_sign_in_url(request,::Devise.mappings[:user]) link_to link_text, Devise::oauth2_client.web_server.( :redirect_uri => session_sign_in_url, :scope => Devise::requested_scope ), end |