tighten / onramp

Easing the onramp for new or non-PHP developers to become Laravel devs.
https://onramp.dev/
MIT License
157 stars 56 forks source link

Login through github does not seem to work #580

Closed attisimon closed 4 weeks ago

attisimon commented 3 months ago

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 commented 2 months ago

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 commented 1 month ago

Hey @mattstauffer!

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

What I did today was this:

attisimon commented 1 month ago

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

MarcyLina commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

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 commented 1 month ago

@sperelson haha I saw that error, and fixed it. Sorry about that! https://github.com/tighten/onramp/commit/f19089f64b33fe6a60499e34d307ff114ad83a29

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 commented 4 weeks ago

@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 commented 4 weeks ago

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 commented 4 weeks ago

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 commented 3 weeks ago

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