I'm trying to use twitter's oath 1.0 via STTwitter cocoa pod to get a user access token as described here https://developer.twitter.com/en/docs/tutorials/authenticating-with-twitter-api-for-enterprise/oauth1-0a-and-user-access-tokens . I have a twitter developer app approved with a callback url configured in a similar format https://twitter.example.com . From what I understood the expected behaviour would be to go through these steps to get the oauth_verifier
at the last step.
1) https://api.twitter.com/oauth/authorize?oauth_callback_confirmed=true&oauth_token_secret=SOMESECRET&force_login=1&oauth_token=SOMETOKEN
2) https://api.twitter.com/oauth/authorize
3) https://twitter.example.com/?oauth_token=SOMETOKEN&oauth_verifier=SOMEVERIFIER
Instead what I'm currently getting is an error after step 2 and no redirect url back at all. The last step redirects to this login page on my web view. In this case I even double checked if the user credentials were correct by logging on twitter's website directly.
1) https://api.twitter.com/oauth/authorize?oauth_callback_confirmed=true&oauth_token_secret=SOMESECRET_login=1&oauth_token=SOMETOKEN
2) https://api.twitter.com/oauth/authorize
3) https://twitter.com/login/error?username_or_email=SOMEEMAIL&redirect_after_login=https%3A%2F%2Fapi.twitter.com%2Foauth%2Fauthorize%3Foauth_token%SOMETOKEN
I have found the issue and it was related to WKWebview paste with keyboard paste text twice the password input, thus causing an authentication failure on twitter.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.