Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I reset the keys / token? #733

Closed
christophrumpel opened this issue Nov 8, 2018 · 5 comments
Closed

Can I reset the keys / token? #733

christophrumpel opened this issue Nov 8, 2018 · 5 comments
Labels

Comments

@christophrumpel
Copy link

Hey Abraham. Thanks for this great package. Been using quite long for my Laravel Notifications package. 馃憤

I was wondering if it's possible to reset the consumer keys and auth tokens. Until now I have just created a new OAuth object, but for testing, I would prefer to just change it through a method. It should probably work by doing the same that happens in the constructor, but what do you think about adding a method where I can just pass the keys and tokens again like with the constructor?

@christophrumpel christophrumpel changed the title Can I reset the keys / token= Can I reset the keys / token? Nov 8, 2018
@christophrumpel
Copy link
Author

Ok, actually I can't reset it myself. I can set the oauth tokens, because this method is public, but not the consumer method. So right now is no way to change the consumer keys without creating a new object right?

@abraham
Copy link
Owner

abraham commented Nov 8, 2018

My thought is that changing the consumer key is a large enough change that you should be instantiating a new TwitterOAuth object.

@christophrumpel
Copy link
Author

Hmm yeah I get you point here. My problem with this is, that I have mocked the oauth object which I provide it in a class constructor. Now when the user wants to change the settings, I need to create a new object which I can't properly mock.

With Laravel notifications, the settings can be overridden on a per-user level. So changing the keys a common approach.

So maybe this could be helpful to others as well? Would you accept a PR with a reset method or don't you want that addition at all?

@abraham
Copy link
Owner

abraham commented Jul 24, 2023

TwitterOAuth is in maintenance mode and major improvements are no longer planned. #1188

@abraham abraham closed this as completed Jul 24, 2023
@christophrumpel
Copy link
Author

Alright, thanks for the update 馃憤

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

No branches or pull requests

2 participants