-
Notifications
You must be signed in to change notification settings - Fork 298
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 application-only auth support #48
Conversation
@sferik @ryangreenberg hey guys, I know that you've been looking at application-only authentication for Twurl. I put up this PR with support Guest too. Let me know what you think and if we can merge this so others in my team (@ twitter) can use it. Thanks |
cc: @sferik for any commentary |
@@ -1,6 +1,7 @@ | |||
module Twurl | |||
class RCFile | |||
FILE = '.twurlrc' | |||
APP_ONLY_PROFILE = 'app-only' |
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.
I’m not happy about hardcoding this.
Overall, this looks fine, however it’s a somewhat different approach from what @ryangreenberg and I agreed upon after some discussion in #47. I’m open to this approach—working, tested code trumps jibber-jabber every time—however, I have a concern about overloading the Specifically, this issue is still unaddressed:
In other words, what happens if try to authorize a client to be used in “app-only mode” and then authorize the same client in “user mode”? Ideally, I’d like users to be able to use a single client, with and without the Curious to hear what @ryangreenberg thinks about this solution and whether this solves his use-case, since he’s the one who initially raised the issue. |
@sferik Hi Erik, thanks for taking a look. And sorry I didnt look at #47 before, it was until I posted this PR that I saw it. And I think this approach incidentally solves exactly that issue, because by having a 'app-only' profile we can switch between user auth and app-only auth on the same consumer key. We could put them all together in the same user's profile but right now, I am using app-only I dont even have to accept the PIN or anything like that because it is not linked to my account at all. example:
in the .twurlrc file you will see something like
then you can use the same key for app-only
in the .twurlrc file you will see something like
And now I can toggle between both auth methods using:
or
|
No description provided.