Is there a way to sign a message with Twitter OAuth and publicly verify it?

Viewed 29

I would like to be able to sign a message after a user has been verified via OAuth. Anyone should be able to publicly verify that the Twitter user has indeed authenticated and signed this message.

Example case: I want to build an app that ties certain information to a Twitter account which anyone can verify. Say I want to ask the user for his / her favorite fruit. I have the user authenticate with my frontend and have them sign the message 'pineapple' with some Twitter key.

Requirements:

  1. the authentication should not be tied to my app: anyone that performs the same steps can generate a valid signed message (if they are given permission by the user to authenticate via Twitter)
  2. the signed message does not carry any sensitive information, because it will be publicly shared
  3. anyone can verify that the message was signed by Twitter user with id 123456

Is this possible with the current Twitter OAuth API? The only workaround we have so far is to store this information in the user's Twitter Bio and fetch it, which is not ideal.

1 Answers

No, there is nothing in the Twitter API that would allow you to store arbitrary information in an arbitrary / invisible field in the user profile. Twitter also does not provide "signing" like this.

Related