Skip to content
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

Login through github does not seem to work #580

Closed
attisimon opened this issue Apr 3, 2024 · 15 comments
Closed

Login through github does not seem to work #580

attisimon opened this issue Apr 3, 2024 · 15 comments

Comments

@attisimon
Copy link

Hello!

I accepted to connect through GitHub, but cannot seem to be able to log in. I stay on the same login page and there is no hint in the console or network activity in the browser. Github responds with 302 Found, but Onramp stays the same, not logged in.

Is there an additional step I need to do or is this something that needs an update?

Thanks!

@mattstauffer
Copy link
Member

Hey @attisimon! Sorry for the delay; I haven't been able to reproduce your issue but would love to make sure we can help you with it. Let me know if it's still persisting for you!

@attisimon
Copy link
Author

Hey @mattstauffer!

Only today I got to check this again and it still happens.

What I did today was this:

  • I was already logged into GitHub on this browser

  • I went to https://onramp.dev/en/login and clicked on "Login or Register with :octocat:"

  • the pages seems to briefly reload, but nothing else happens (there is not error in the console log)

  • then I logged out of GitHub

  • I went to https://onramp.dev/en/login and clicked on "Login or Register with :octocat:"

  • the page redirected to GitHub, asking me to login and then to approve the authorization

  • I am redirected back to the login page, seeing the login form, just as before

  • clicking on "Login or Register with :octocat:" will briefly reload the page, but I am not logged in

@attisimon
Copy link
Author

I disabled ad and tracker blocking and I also disabled VPN, but this did not help either.

@MarcyLina
Copy link
Contributor

Hi @attisimon!

I am also having trouble recreating this bug. Can you tell me what browser & version you are using as well as your OS? Thanks!

@attisimon
Copy link
Author

attisimon commented May 28, 2024

Hi @MarcyLina,

I am using Firefox 126.0 (64-bit) on openSUSE Tumbleweed 20240524 KDE desktop.

I quickly tested on Google Chrome Version 125.0.6422.112 (Official Build) (64-bit) on the same openSUSE machine
and
again using Firefox 126.1 (41973) on an iPhone runnning iOS 17.4.1.

The behavior is the same.

@mattstauffer
Copy link
Member

@attisimon Thanks so much for your patience. Would you mind trying again? We added a little error notification that you hopefully will see when it fails, and also added additional logging so we can try to get to the core of the issue. Thanks!!

@attisimon
Copy link
Author

attisimon commented Jun 4, 2024

Hi @mattstauffer!

I have tested again, using Google Chrome on Linux, Version 125.0.6422.141 (Official Build) (64-bit).
The behavior is the same. I have emptied everything from the cache before testing.
The odd thing is that there is no clue in the console about what is happening.
There is a recording further down. After stopping the recording, I also checked the network tab, nothing strange there either.

Hopefully you'll see something in the server logs. I have posted this right after making the recording, so the timestamp of this post is close enough to the testing seen in the recording.

Screencast_20240604_142945.webm

@sperelson
Copy link

sperelson commented Jun 4, 2024

Broken for me, it looks like the ENV var GITHUB_REDIRECT_URL is wrong, but I can't be sure. The URLs in the flow are:

https://github.com/login/oauth/authorize?...&redirect_uri=https%3A%2F%2Fonramp.deven%2Flogin%2Fgithub%2Fcallback&scope=...

See that onramp.deven which should look like onramp.dev%2Fen

Then we get the error in the URL:

https://onramp.dev/en/login/github/callback?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&...

@mattstauffer
Copy link
Member

@attisimon I think we've fixed it finally? Thank you so much for the video!! @sperelson we tested it a bunch of times and couldn't reproduce it, but after testing it in an incognito browser we were finally able to reproduce it and it was indeed the missing slash in the GITHUB_REDIRECT_URL. Thank you so much for your investigation!

@sperelson
Copy link

sperelson commented Jun 4, 2024

Thank you!

Although, I did get a 500 after submitting the first step of the wizard: https://onramp.dev/en/wizard - but my profile is created and preferences page works fine 😄

@mattstauffer I'll say hi in person at Laravel Live UK

@mattstauffer
Copy link
Member

@sperelson haha I saw that error, and fixed it. Sorry about that! f19089f

Glad to see you were able to log in, and I look forward to meeting you! Make sure you get a Tighten pin from me--I owe you that at the very minimum for your help here!

@attisimon
Copy link
Author

@mattstauffer , I have cleared everything and tested again.
I am redirected to GitHub, sign in, authorize, then redirected back to onramp.dev and get this error:
onramp-github-error

The same error appears on every subsequent click on the login button.

@jakebathman
Copy link

Matt pushed a fix for this early this morning, looks like we weren't handling GitHub accounts that only had a username (and not an additional display name). This should also be fixed now.

Thanks for being super patient and giving us extremely helpful and actionable reports of what's going wrong for you.

@attisimon
Copy link
Author

Guys, I was now able to finish the process of registering and logging in with my GitHub account. From my point of view this is fixed. Thanks everyone!

@mattstauffer
Copy link
Member

Fantastic. @attisimon and @sperelson thank you so much for helping us debug this issue!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants