-
-
Notifications
You must be signed in to change notification settings - Fork 103
Conversation
… it to connect_handler, since it won't work.
I can't accept this pull request because its not good to assume that the user wants to register an account with the same email they have associated with their facebook account. |
Thanks for the other merge :) Please have a second look at this, the user registration email choice is in the application, not in flask-social. This pull request only tries to fetch email in the same graph api call, and leave it there, for further usage. |
I understand you're motivation now. I don't know why I made my previous conclusion. Suppose I didn't consider the context entirely. |
@@ -148,6 +148,8 @@ def connect(response): | |||
if cv is None: | |||
do_flash('Access was denied by %s' % provider.name, 'error') | |||
return redirect(get_url(config_value('CONNECT_DENY_VIEW'))) | |||
if 'email' in cv.keys(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the part I'm not happy about. Any hints to do it better? Leaving 'email' in cv will cause Connection model changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cv.pop('email', None)
is cleaner, if thats what you're looking for.
@alexef maybe I'm misunderstanding, but I think leaving In this case, you'd add the email to the
assuming that It would be very similar to this commit I made to add |
@eriktaubeneck it's been a while since writing this pull, but afair, the reason for removing email was this call:
I don't see in your commit where do you modify the datastore to add full_name. Despite all of that, it makes sense not to mix user.email and connection.email, but at the time, it was to much of a change from my side. |
@alexef ah ha, yes. The data store is actually implemented at the application level, so with respect to flask-social-example, it would be in this file, which I still need to update with respect to that commit I merged earlier today! Glad you mentioned that. The
To add the email, you'd just add
to the class. This would be different, I think, if using the Mongo or PeeWee setup (I haven't used them). As to not mixing |
Merged and add email to all other providers. Some may not work (i.e. return |
This is awesome, just the other day I revisited this code in a new flask app. Thanks for the merge. |
Sorry it took me so long, but I just got a bunch of good stuff merged ;) thanks for your contribution! |
I'm using it like this:
I know it's poor design, if you guide me, I'll write a better solution. Thanks.