mironal / TwitterAPIKit

Swift library for the Twitter API v1 and v2 🍷
MIT License
118 stars 23 forks source link

Cannot sign in with Oauth 1.0a using email #147

Open juanjovn opened 1 year ago

juanjovn commented 1 year ago

Hi,

I'm having an issue trying to log in with oauth 1.0a. It works if the users types the username but otherwise if the user try to log in using the full email address he is redirected to a blank page. If you request de desktop website tapping on top button (aA) a website is shown with an error: Simulator Screen Shot - iPhone 13 Mini - 2022-10-31 at 08 27 35

mironal commented 1 year ago

Hi! Thanks for trying TwitterAPIKit.

I have successfully logged in using email and password with OAuth 1.0a in my sample app (https://github.com/mironal/TwitterAPIKit-iOS-sample).

If you can describe the situation and code in which the error occurred, I will be able to help you further.

juanjovn commented 1 year ago

Hi, I was having the same issue in your example project with my own API Secrets, so I'm going to double check some things and write back to you if I find the workaround.

Thanks for your quick reply! :)

juanjovn commented 1 year ago

I'm still struggling with it. I'm using your demo project only changing my consumerKey and consumerSecret (I've set the labels as hidden for security) and as you can see in the video attached with email doesn't work 😕 So if it's working for you I assume that it can be a problem with my app's configuration in the Twitter Developer Portal, but I have no clue what could be wrong.

https://user-images.githubusercontent.com/32565260/198994983-81259047-cb15-4dc4-93c4-19bfd787e8e7.mov

mironal commented 1 year ago

Thanks for the detailed video, it's very helpful. Since you seem to be using 2FA, I'll try it later with my account enabled as well.

It's nighttime in Japan right now, so my reply will be tomorrow. 😴

mironal commented 1 year ago

@juanjovn Hi! I have successfully authenticated using email with 2FA enabled on my account.

On the other hand, your video shows a successful login using the account name, so I don't see any problem with the Consumer Key or oauthCallback settings in the sample app.

https://user-images.githubusercontent.com/537587/199632923-824feb3a-5d4f-4858-8f00-7d92d555ad34.MP4

It is very unlikely, but if you turn on Request email from users in the Developer Portal, it might change something (I don't think this setting affects login by email...). (I don't think this setting affects email logins, though.

image