Sha256: 5cb4e27765021cd3c4507e9769d096b0dd39fcf85f612fc1822f714d1867d39a

Contents?: true

Size: 1018 Bytes

Versions: 14

Compression:

Stored size: 1018 Bytes

Contents

# frozen_string_literal: true

class Ibrain::SocialCallbacksController < Devise::OmniauthCallbacksController
  include ActionController::Helpers
  include Ibrain::Core::ControllerHelpers::Response
  include ActionController::MimeResponds

  def instagram
    generic_callback( 'instagram' )
  end

  def facebook
    generic_callback( 'facebook' )
  end

  def twitter
    generic_callback( 'twitter' )
  end

  def google_oauth2
    generic_callback( 'google_oauth2' )
  end

  def apple
    generic_callback( 'apple' )
  end

  def line
    generic_callback( 'line' )
  end

  def create
    user = line_repo.find_or_initialize!

    render_json_ok(user, nil)
  end

  def new_user_session(*args)
    new_session(*args)
  end

  private

  def repo
    AuthRepository.new(resource, params)
  end

  def line_repo
    LineRepository.new(resource, request.env['omniauth.auth'])
  end

  def apple_repo
    AppleRepository.new(resource, request.env['omniauth.auth'])
  end

  def generic_callback( provider )
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
its-ruby-auth-0.0.1 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.20 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.19 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.18 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.17 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.16 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.15 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.14 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.13 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.12 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.11 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.10 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.9 app/controllers/ibrain/social_callbacks_controller.rb
ibrain-auth-0.3.8 app/controllers/ibrain/social_callbacks_controller.rb