Sha256: 629a953b73997b2993f13b105abc93c34c790ceb4d9aa05e179eeb4af473a8a8

Contents?: true

Size: 711 Bytes

Versions: 18

Compression:

Stored size: 711 Bytes

Contents

module SharedUser
  extend ActiveSupport::Concern

  included do
    devise :database_authenticatable, :confirmable, :lockable, :recoverable,
           :registerable, :rememberable, :timeoutable,
           :trackable, :validatable, :omniauthable, password_length: 7..72

    attr_accessor :other_key

    # They need to be included after Devise is called.
    extend ExtendMethods
  end

  def raw_confirmation_token
    @raw_confirmation_token
  end

  module ExtendMethods
    def new_with_session(params, session)
      super.tap do |user|
        if data = session["devise.facebook_data"]
          user.email = data["email"]
          user.confirmed_at = Time.now
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
devise-3.5.10 test/rails_app/lib/shared_user.rb
devise-4.0.3 test/rails_app/lib/shared_user.rb
devise-3.5.9 test/rails_app/lib/shared_user.rb
devise-4.0.2 test/rails_app/lib/shared_user.rb
devise-4.0.1 test/rails_app/lib/shared_user.rb
devise-3.5.8 test/rails_app/lib/shared_user.rb
devise-3.5.7 test/rails_app/lib/shared_user.rb
devise-4.0.0 test/rails_app/lib/shared_user.rb
devise-4.0.0.rc2 test/rails_app/lib/shared_user.rb
devise-4.0.0.rc1 test/rails_app/lib/shared_user.rb
devise-3.5.6 test/rails_app/lib/shared_user.rb
devise-3.5.5 test/rails_app/lib/shared_user.rb
devise-3.5.4 test/rails_app/lib/shared_user.rb
devise-3.5.3 test/rails_app/lib/shared_user.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/devise-3.5.2/test/rails_app/lib/shared_user.rb
devise-3.5.2 test/rails_app/lib/shared_user.rb
devise-3.5.1 test/rails_app/lib/shared_user.rb
deviseOne-1.0.0 test/rails_app/lib/shared_user.rb