Prelang / feedback

8 stars 0 forks source link

Social Network Integration #10

Open yordis opened 9 years ago

yordis commented 9 years ago

Right now we have only facebook and the way is implement is not to scalable. It's better create a association between user and strategies where you can save more than one. Something like this

class User < ActiveRecord::Base
  has_many :strategies
end

class Strategy
  # provider:string
  # uid:string
  # name: string
  # token:string
  # extra_data:json
  # ...

  belongs_to :user
end

This way is very flexible and you can add more strategies easier.

Examples. https://github.com/alex-klepa/rails4-bootstrap-devise-cancan-omniauth http://stackoverflow.com/questions/21249749/rails-4-devise-omniauth-with-multiple-providers https://github.com/AlexanderZaytsev/domp http://sourcey.com/rails-4-omniauth-using-devise-with-twitter-facebook-and-linkedin/

eriknomitch commented 9 years ago

Would love to do this... Much better solution. Once I get some free time I'll add it.

yordis commented 9 years ago

@eriknomitch I will love it :smile:. This is one of the most important feature in 2014. Even we can try to add it into devise somehow. Devise let you use omniauth but really is pretty poor the integration.

Please make a gem with the integration between omniauth and devise.

joshmn commented 9 years ago

+1

yordis commented 9 years ago

@eriknomitch please tell me you have some progress in this man, please.

eriknomitch commented 9 years ago

@yordis I've been 100% on the Prelang Active prototype. :( I'm really deep into it so it's hard to switch to the builder, but I'll keep looking for free time.

Edit: Trust me, Prelang Active will be worth it! And I need to get the prototype done soon.