[#325] Authentication via Social Networks#360
[#325] Authentication via Social Networks#360ruslankhaertdinov wants to merge 10 commits intofs:examplesfrom
Conversation
|
@MaximLarionov I apply review comments and reopen PR into |
There was a problem hiding this comment.
not really DRY to repeat one check in the every single action, WDYT about moving this check to callback before_action?
There was a problem hiding this comment.
Yep, agree.
…, use before filter and use expose instead of private method
|
Moreover, it appears that we partially can't use some social services for oauth. There is 3 cases of oauth behavior:
Usually, auth hash should contain some data, which says, that account from that Social Profile is confirmed/verified by email. But some services doesn't have that data, like LinkedIn or GitHub. So it seems, that we have to develop strategy for those cases. |
52bef83 to
85ec5a3
Compare
85ec5a3 to
cf69813
Compare
|
@MaximLarionov please take a new look |
|
@timurvafin also kindly please review |
|
@MaximLarionov ping) |
app/interactors/fetch_oauth_user.rb
Outdated
There was a problem hiding this comment.
I guess, we should try to find social profile, before finding by email.
If user has already signed with this social account, then he should have Social Profile, so it's more reasonable to look for it, and if we haven't found one - find by email, and create new social profile for him.
|
@ruslankhaertdinov it seems like that's all from my side for current moment :) |
|
@MaximLarionov thanks a lot!) |
1312fdd to
e92ad7b
Compare
e92ad7b to
11a7531
Compare
|
@MaximLarionov please take a look again, when you have time ;) |
app/interactors/oauth_organizer.rb
Outdated
There was a problem hiding this comment.
&& !found_user_by_email?
do we need this check here?
There was a problem hiding this comment.
@MaximLarionov good catch 👍 , seems like this check is redundant here.
…ce, remove unused checks from OauthOrganizer
There was a problem hiding this comment.
@MaximLarionov what do you think, should I leave it as is, or change logic and replace if auth_verified? with if !user_found_by_email??
There was a problem hiding this comment.
Hm, I doubt that we should build something from unverified auth, so auth verification should be kept
|
Moved to FlatstackSchool/rails-examples#3 |
Related to: #325
Demo: https://auth-via-networks.herokuapp.com/