Simple Twitter Oauth authorization asking for credentials every time

后端 未结 2 978
鱼传尺愫
鱼传尺愫 2021-01-15 13:17

I am making a simple twitter based login/signup system using the tutorial here. I get the oauth_token as well as oauth token secret every time I get the user to login. Howe

相关标签:
2条回答
  • 2021-01-15 13:34

    The normal flow dictates that applications send request tokens to oauth/authorize in Twitter's implementation of the OAuth Specification. To take advantage of "Sign in with Twitter", applications should send request tokens received in the oauth_token parameter to oauth/authenticate instead.

    (c) https://dev.twitter.com/docs/auth/sign-in-with-twitter

    So find where their library (or your code) performs request to /authorize endpoint and replace it with /authenticate

    About tokens: as long as you've received user tokens - store it in some persistent storage (database, file, etc) since that tokens are permanent (they will be valid until user haven't revoked them manually).

    0 讨论(0)
  • 2021-01-15 13:45

    Enable option "Sign in with Twitter" for application OAuth Settings

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