Sha256: b980381bdd23b5ca191ab98786a3d5fa73ef1f4396a416c6131b9a37437307bc

Contents?: true

Size: 444 Bytes

Versions: 6

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

module Overrides
  class OmniauthCallbacksController < DeviseJwtAuth::OmniauthCallbacksController
    DEFAULT_NICKNAME = 'stimpy'.freeze

    def assign_provider_attrs(user, auth_hash)
      user.assign_attributes(
        nickname: DEFAULT_NICKNAME,
        name:     auth_hash['info']['name'],
        image:    auth_hash['info']['image'],
        email:    auth_hash['info']['email']
      )
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
devise_jwt_auth-0.1.5 test/dummy/app/controllers/overrides/omniauth_callbacks_controller.rb
devise_jwt_auth-0.1.4 test/dummy/app/controllers/overrides/omniauth_callbacks_controller.rb
devise_jwt_auth-0.1.3 test/dummy/app/controllers/overrides/omniauth_callbacks_controller.rb
devise_jwt_auth-0.1.2 test/dummy/app/controllers/overrides/omniauth_callbacks_controller.rb
devise_jwt_auth-0.1.1 test/dummy/app/controllers/overrides/omniauth_callbacks_controller.rb
devise_jwt_auth-0.1.0 test/dummy/app/controllers/overrides/omniauth_callbacks_controller.rb