-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble with Twitter Signup/Login #8325
Comments
Thanks for opening your first issue! This space is protected by our Code of Conduct - and we're here to help. |
Thanks @jasonmj for reporting this |
hi @jasonmj ,I would like to work on this issue. |
@Anurag2012 Thanks! Note, that I was able to create an account using email instead. I think my Twitter account still has publiclab.org authorized and in case you want me to try to reproduce the issue. |
Wondering if @SidharthBansal is able to try this out to confirm? Thanks for reporting -- this can be a tough one to maintain as it's hard to run tests on an offsite service integration like Twitter's OAuth. Hope we can figure it out! |
@Anurag2012 if you are still available, would you be able to try creating an account on PublicLab.org using your twitter account? |
i finally tracked down the issue. its not a problem in the code base its in the registration of the twitter application. a call back url wasnt added and twitter register it as a desktop application and gave it a pin instead of a url and now it is seeing the app as a desktop instead of a web app which makes it misbehave sometimes.@jywarren, @cesswairimu please we will need to change the twitter app settings. |
Ahhh amazing detective work here! Just notifying @SidharthBansal who built this system to stay synced... I will try to look into this tomorrow! Thank you so much @tawahpeggy ! |
Thanks @jywarren. looking forward to work with @SidharthBansal so this issue can be clossed once and for all. |
Thanks for reporting this @jasonmj and for working on it @tawahpeggy and @SidharthBansal 🐬 |
Thanks @ebarry. the work isn't complete yet though |
Hi all! I think we probably need @SidharthBansal to help us unravel this one. You can find a huge amount of info about the Twitter OmniAuth setup at #2676 -- i'll copy the list here:
@tawahpeggy the tokens are kept secret as environment variables. But if you could screenshot the exact changes that would have to be made on the Twitter settings pages, we can do that!
thanks for digging so much into this @tawahpeggy -- can you elaborate about that last comment about the callback URL? I could probably help find where it is in our code if I know what to look for! |
Also - is this an intermittent issue or is this affecting ALL twitter login attempts? Thank you! |
hello @jywarren thanks for your timely reply and sorry for reaching you just now,i wanted to first of all study the resources you posted above before replying so we can get a solution as soon as possible. |
@SidharthBansal please how did you handle signing up via social links and roles like moderator and admin? |
@tawahpeggy I know @SidharthBansal might be busy, here are a few documentation on the auth system that might give you more context https://github.com/publiclab/plots2/blob/b1c57446d016f8cd0ec149a75298711270e1643e/doc/LOGIN_SYSTEMS.md#how-to-setup-login-modal-on-various-locations and https://publiclab.org/notes/bansal_sidharth2996/08-07-2018/gsoc-multi-party-auth-system |
Okay @cess thanks very much i will look at them ASAP
…On Thu, Oct 29, 2020 at 12:48 PM Cess ***@***.***> wrote:
@tawahpeggy <https://github.com/tawahpeggy> I know @SidharthBansal
<https://github.com/SidharthBansal> might be busy, here are a few
documentation on the auth system that might give you more context
https://github.com/publiclab/plots2/blob/b1c57446d016f8cd0ec149a75298711270e1643e/doc/LOGIN_SYSTEMS.md#how-to-setup-login-modal-on-various-locations
and
https://publiclab.org/notes/bansal_sidharth2996/08-07-2018/gsoc-multi-party-auth-system
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8325 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJT4KDSRYNKQAWOL7K5QLDTSNFI7RANCNFSM4QEBTMTQ>
.
|
Hi @tawahpeggy i believe @SidharthBansal was referring only to local testing and the difference between Shall I look in the logs for |
Also noting that i was able to log in via Twitter at https://stable.publiclab.org/ as |
We could try by creating a new Twitter account and trying to open a PL account using it...? |
A twitter application you mean. i have already created one using my twitter account. we could use to test that @jywarren .should i email you the secret tokens and keys so you try that since i dont have access to do that. |
Ah, no i just meant we have at least four scenarios i can think of:
I've tested 4) - it works, and I think 2) doesn't involve the login screen (it can only be done from the profile page) so it's not really in question here, but 1) and 3) are what we're worried about. @tawahpeggy which are you -- i would guess 3)? As the original poster @jasonmj said I'll search logs a bit to see if we can find |
I couldn't find the twitter handle, and i think the log is just too old. I recommend doing this in GitPod to try to find the error! https://gitpod.io/#https://github.com/publiclab/plots2/ |
Sentry issue: PLOTS2-Y0 |
I just linked a Sentry issue with |
OK, i got logs for that attempt:
Strangely it means the user would seemingly be banned - not sure which though. Here's the test which confirms this behavior: plots2/test/functional/user_sessions_controller_test.rb Lines 270 to 280 in c60aaab
|
Let me see if the user record was actually created... maybe it's... via line 52 (or 204) of the user_sessions_controller here? plots2/app/controllers/user_sessions_controller.rb Lines 52 to 57 in c60aaab
|
OK, i think possibly bc I created a Twitter account with no email address (just a phone number) it failed to find someone to associate because it used a nil email to search? OK! Yes! I added an email to my new twitter account, and now i got an error, hopefully it's the same as the orig. poster!
|
OK! There we go! |
Sentry issue: PLOTS2-119 |
Lines 25 to 28 in 4fadc45
allocator undefined for Proc message:
collectiveidea/delayed_job#478 suggests that an object can not be cleanly deserialized... could it be... Well OK there seem to be a number of relevant possible scenarios here. Both of these pathways could lead to this same error: plots2/app/controllers/user_sessions_controller.rb Lines 75 to 99 in c60aaab
And if there's no email provided, perhaps we should divert away here too: plots2/app/controllers/user_sessions_controller.rb Lines 52 to 56 in c60aaab
I think this section should divert to the final |
Sentry issue: PLOTS2-117 |
Sentry issue: PLOTS2-8W |
And this last Sentry error notes a problem if there's no email provided:
OK, so MANY issues related to if Twitter doesn't provide an email. Let's try to write a test for that scenario, AND for the scenario with the For the second one, if |
https://github.com/publiclab/plots2/blob/f905c7a01e6824881d55c208c927f008e6fb8bd0/doc/LOGIN_SYSTEMS.md#testing notes that we can modify the test environment to simulate that, in https://github.com/publiclab/plots2/blob/main/config/environments/test.rb: Attempting these changes in #8734 !! |
Sentry issue: PLOTS2-12Q |
Hmm, interesting, just saw another Twitter Sentry issue, i just linked it -- |
Wow you have indeed done alot of research Sir. thats wonderful. let me start from some where and possibly catch up with you 😄 |
Sorry @jywarren I haven't been on ma feet for some days cause I wasnt
feeling too well. Felt better after visiting a Dr and taking some
medications. Will definitely start the work tmr hopefully.
…On Wed, Nov 11, 2020, 9:55 PM Jeffrey Warren ***@***.***> wrote:
Hmm, interesting, just saw another Twitter Sentry issue, i just linked it
-- Failed to open TCP connection to api.twitter.com:443 (getaddrinfo:
Temporary failure in name resolution). Probably unrelated but good to
keep in mind.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8325 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJT4KDTVZHK6S4WP4QEW6K3SPL25RANCNFSM4QEBTMTQ>
.
|
@tawahpeggy I had missed this email but wanted to re-iterate my wish for your health and safety. I'm glad you're feeling better. I'm circling back to say I have created a test and new procedures for when someone tries to use Twitter in scenarios 1-3 (i believe) above, and a test for at least one of those scenarios (i believe they all use the same logic -- Can folks retry /after/ ensuring their Twitter account has an email address, on https://stable.publiclab.org (our testing server)? I'm going to close this now but we can re-open if there are remaining scenarios which still cause an error message. Thanks to everyone for their patience and very thorough research and documentation, especially @tawahpeggy and @jasonmj -- 🙌 |
If there are further issues here we may want to create a test for a Twitter user with no |
Hi there, I just signed up for a new account using the Twitter option. After authorizing via Twitter's consent screen, I was redirected back to publiclab.org and saw this:
I see the same error when I tried clicking the verification link from the confirmation email and when I tried logging in.
The text was updated successfully, but these errors were encountered: