-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Google OAuth provider #32
Conversation
Hey @ssaavedra, Thanks for the pull request. Does this provide different functionality than the GoogleEmail2 module? |
Well, to be honest, I didn't find GoogleEmail2 yesterday, and that was why I made this. However, there are a couple differences:
If you believe this is not worth merging, I can understand that, but let me know what you think about it. |
I too didn't know about GoogleEmail2 for a long time, and would've expected to find that functionality here, not there (see comments in #18). ping @snoyberg -- what would you think of deprecating GoogleEmail2 and pointing users at this project instead? If that's a Good Idea, we should merge this and ensure feature parity. If not, then I would suggest not merging this, adding a note to the README pointing users at GoogleEmail2 and (optionally) opening your "more answers and metadata" feature as a PR on that module. I think using the guid-vs-email is not a big enough difference to warrant duplicating the functionality in two projects. |
I'm in favor of your recommendation (deprecating GoogleEmail2), though it seems to do it the differences mentioned above will need to be worked out. For the ID issue, perhaps a configure option would be sufficient. |
Agreed about considering the API differences before moving forward.
IMO, this would cause the biggest problem for users trying to migrate. I don't see a clear win in storing the guid vs the email as the ident -- sure it makes more conceptual sense, but email should be just as unique and consistent for a given user. @ssaavedra what do you think about changing this PR to use the email?
As long as this is a strict increase in functionality and not a change to any existing behavior in GoogleEmail2, I don't think we should worry about it. In general, I think as long as a user could easily migrate from one to the other (where I define "easily" as without migrating stored data), differences in the API are OK. |
I think we could leave both choices. I think you understood me wrong in some point. The existing GoogleEmail2 API has more metadata available, so an existing application can query many more things about a user's profile than mine can (currently). However, these characteristics for querying Google+ data should be restricted to apps with the plus.me scope, which my implementation does not need to request (as that exceeds OAuth2). Maybe the Google+ information about a profile is not so related to authorization & authentication as it is about user's profiling, but I would love your input about that. I will rework my PR so that the And please, if I can do anything to improve the styling, docs or anything let me know; I'm new to contributing Haskell code :) |
Ah, sorry about that.
That's the approach we've been taking. As long as there's something in However, if we're looking to replace GoogleEmail2 we might have to re-think that a bit.
Awesome, thanks!
I haven't looked very closely yet, but definitely plan to once this discussion settles on a path forward and the churn decreases. Thanks again for the contribution! |
I am not sure if you are awaiting any further input from me. I made those improvements 14 days back (just before your answer :) and I haven't heard back. I am not sure on what to say about the Authentication/Profiling issue. Maybe this is getting discussed somewhere else (mailing list?)? |
, googleUid | ||
, emailUid | ||
, module Yesod.Auth.OAuth2 | ||
) where |
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.
Can you dedent this so it's 4 spaces, not 8?
Added some style notes (sorry I didn't realize this was ready for review). Other than that this LGTM and I plan on merging soon. |
All right. Hlint does no longer show any suggestion on the file. And sorry about the indentation, I used emacs with default haskell-indentation-- lengths, and it didn't even respect the lines from the copy & paste. I hope it is ok now, but let me know! :) |
This LGTM! I'll merge/release today or tomorrow for sure. We can pursue the deprecation of GoogleEmail2 at a later time (and I'll add a comment to make the situation clear in the meantime). |
Ping @jferris it looks like I lost the ability to merge. |
@pbrisbin fixed. |
Funnily enough I started this project back then with Google OAuth2 because I like that. |
No description provided.