Joined January 2017
·

UnsungGhost

Posted to Linkedin OAuth2 Login for Rails over 1 year ago

I just have to say this is the most comprehensive text guide that I've seen. As a beginner, no other site says where to put individual files or snippets of code. A few notes/questions.

Part 6 is where I'm having the most difficulty. This line in particular:
if oauthaccount = oauth.createoauth_account!

First off, if statements should use double equals to compare. "==" Not sure if the single equals was intentional. Then there's a bang in a conditional, which is very odd. I'm not sure what this line is suppose to do, and I'm pretty sure there's at least one error here.

Second, I'm not sure what type of logic is suppose to go where there is "..." Is this where you assign oauth_account's value to the values already in use in YourApp's model (or vis versa)? Do you run another method here?

Part 7 also has a single equals in a conditional:
unless oauthaccount = OauthAccount.where(uid: @authhash[:uid]).first

Like I said though, this was way more helpful than the githubs for any of the linkedin gems and really the best I've been able to find.

Achievements
1 Karma
0 Total ProTip Views