Skip to content
Snippets Groups Projects
Commit 031e62af authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

maybe now login with google work

parent aed7c67d
No related branches found
No related tags found
No related merge requests found
require 'open-uri'
class V1::OmniauthCallbacksController < DeviseTokenAuth::ApplicationController
attr_reader :auth_params
......@@ -76,8 +77,7 @@
# break out provider attribute assignment for easy method extension
def assign_provider_attrs(user, auth_hash)
avatar = auth_hash['provider']=='google_oauth2' ? "" : auth_hash['info']['image']
avatar = auth_hash['provider']=='google_oauth2' ? open(auth_hash['info']['image']) : auth_hash['info']['image']
user.assign_attributes({
nickname: auth_hash['info']['nickname'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment