balanv
balanv

Reputation: 10898

Reusing OAuth token and secret when Consumer key is changed in Twitter application (Rails)

I am working in a Rails application in which i use OmniAuth to authenticate user with Twitter. Once user is authenticated properly, i then get the OAuth Token and OAuth Secret from Twitter.

I can then use this token and secret pairs to make api calls from my Rails application.

Consumer key from my twitter application is used to make api calls along with users token and secret.

Now, when my consumer key (of my twitter app) is changed. All the previously obtained OAuth token and secret are not working (i cannot use it to make api call).

How should i handle this situation when the consumer key is changed?

is there any way to refresh the Oauth token and secret with new consumer key without prompting user again to authenticate with twitter?

Upvotes: 1

Views: 376

Answers (1)

Krishna Srihari
Krishna Srihari

Reputation: 722

If you changed the consumer keys it means you are using different twitter application, how old application token supports new application? its not possible to merge two twitter application tokens.

Once you changed the consumer key, user again needs to authenticate the new twitter application.

Upvotes: 2

Related Questions