What to do with twitter oauth token once retrieved?

后端 未结 2 659
悲哀的现实
悲哀的现实 2021-02-04 05:48

I\'m writing a web app that will use twitter as its primary log on method. I\'ve written code which gets the oauth token back from Twitter. My plan is now to

  1. Find
相关标签:
2条回答
  • 2021-02-04 06:25

    Sounds good.

    However, I suggest not using the Twitter User Name as the primary index for the User table. As Twitter user names can be changed. I learned this the hard way.

    You should be fine using the Twitter User ID (big int) as the primary index as it doesn't change if the user changes their user name.

    As for the token its self, you are a-okay with storing it for future use. In fact, you are encouraged to do so.

    0 讨论(0)
  • 2021-02-04 06:28

    Could you not just save the oauth_token as cookies instead of the GUID and do the user based lookup on the oauth_token or is that bad practice?

    0 讨论(0)
提交回复
热议问题