TablePlus / diagram-plugin

111 stars 10 forks source link

[bug] Cannot log in via GitHub on web version #41

Open rebwag opened 9 months ago

rebwag commented 9 months ago

I found the web version after ~realizing there was no way to export the diagram (not PNG/SVG) from the TablePlus plugin, among other limitations~. I want to be able to persist my work. (edit: Found the button in the upper right corner to save to PNG/SVG etc, but it's very much not obvious. It should probably live next to the Import button and be labeled Export like the web version.)

However, when I tried authing with GitHub, after allowing, essentially nothing happens. There's just a blank white page with the URL https://diagramplus.com/auth/github/callback?code=&state=. Browser Incognito mode didn't help.

I confirmed my GitHub account shows the Diagram application has been granted access at https://github.com/settings/applications. If I attempt to "share" a diagram (Sharing a diagram requires logging in You must login to use this feature.) I get the challenge to auth again.

In this case, I cannot use the option to auth with Google.

Is the only support option for the web version at https://diagramplus.com/ to email nick@tableplus.com or can web issues be raised here?

huyphams commented 9 months ago

Hi @rebwag do you allow the app to read your email in github oauth settings? Diagram need the email to register the account.

rebwag commented 9 months ago

Thanks for the quick response, Huy. Yes, I do allow it. My email is set to private, but that shouldn't matter. I have several other applications authed this way without issue.

From what I read, Diagram might need to make an additional call to https://api.github.com/user/emails (source https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app#making-authenticated-requests) to access the private emails before the callback since the scoped user email may be returned as null.

huyphams commented 9 months ago

actually, we did it. can I have your github private email please? (you can drop me an email to nick@tableplus.com )