Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

feat(users): get profile picture from provider in oauth signup #1571

Closed
wants to merge 1 commit into from

Conversation

itelo
Copy link
Contributor

@itelo itelo commented Oct 15, 2016

No description provided.

Copy link
Member

@mleanos mleanos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itelo See my comment. This doesn't work for any provider other than Google+.

@@ -160,7 +160,7 @@ exports.saveOAuthUserProfile = function (req, providerUserProfile, done) {
lastName: providerUserProfile.lastName,
username: availableUsername,
displayName: providerUserProfile.displayName,
profileImageURL: providerUserProfile.profileImageURL,
profileImageURL: providerUserProfile.providerData.image.url,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is only present on Google+. I tested with Facebook, Twitter, Google+, and GitHub. This breaks the authentication for each one that I tested, other than Google+. Also, the Google+ authenticates but the image reference is incorrect. The url has a "http://localhost" prepended to the url coming from the provider. This actually seems to be an issue in the current master without this change.

@itelo Can you look into whether or not there's a way to reconcile these urls, by inspecting the providerUserProfile fields that are returned for these provider?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mleanos I found a strange bug, I'll cancel the PR until better understand what 's happening

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants