@ -58,13 +58,14 @@ module Omniauthable
email_is_verified = auth . info . verified || auth . info . verified_email || assume_verified
email_is_verified = auth . info . verified || auth . info . verified_email || assume_verified
email = auth . info . verified_email || auth . info . email
email = auth . info . verified_email || auth . info . email
email = email_is_verified && ! User . exists? ( email : auth . info . email ) && email
email = email_is_verified && ! User . exists? ( email : auth . info . email ) && email
display_name = auth . info . full_name || [ auth . info . first_name , auth . info . last_name ] . join ( ' ' )
{
{
email : email ? email : " #{ TEMP_EMAIL_PREFIX } - #{ auth . uid } - #{ auth . provider } .com " ,
email : email ? email : " #{ TEMP_EMAIL_PREFIX } - #{ auth . uid } - #{ auth . provider } .com " ,
password : Devise . friendly_token [ 0 , 20 ] ,
password : Devise . friendly_token [ 0 , 20 ] ,
account_attributes : {
account_attributes : {
username : ensure_unique_username ( auth . uid ) ,
username : ensure_unique_username ( auth . uid ) ,
display_name : [ auth . info . first_name , auth . info . last_name ] . join ( ' ' ) ,
display_name : display_name ,
} ,
} ,
}
}
end
end