userstyles.world icon indicating copy to clipboard operation
userstyles.world copied to clipboard

Join via Github fail

Open QIUZAIYOU opened this issue 5 years ago • 10 comments

  • Browser:Edge
  • Screenshot:Screenshot
  • Additional context:{"error":"bad endpoint"}

QIUZAIYOU avatar Sep 25 '21 14:09 QIUZAIYOU

I had a look at the logs, and it appears that your primary email address of your GitHub account isn't verified. We don't allow unverified accounts in order to prevent spam and/or broken email addresses. The error on our side is quite vague, so I'll look into making it more helpful and clear.

vednoc avatar Sep 25 '21 16:09 vednoc

Ehe, yeah. The vagueness is intended. As we also have a share bit of encryption going on in this process and singling out errors will be more or less giving hints to potential attacks. But at this stage whereby we weren't able to find a primary email should be find to give a appropriate error.

Gusted avatar Sep 25 '21 18:09 Gusted

https://github.com/userstyles-world/userstyles.world/commit/1dfb38ff330916022890519c8d3b1916c1b2782e ensures that certain errors are communicated to the users when it doesn't involve weird security/cryptographic-related actions.

Gusted avatar Sep 26 '21 16:09 Gusted

I had a look at the logs, and it appears that your primary email address of your GitHub account isn't verified. We don't allow unverified accounts in order to prevent spam and/or broken email addresses. The error on our side is quite vague, so I'll look into making it more helpful and clear.

Ehe, yeah. The vagueness is intended. As we also have a share bit of encryption going on in this process and singling out errors will be more or less giving hints to potential attacks. But at this stage whereby we weren't able to find a primary email should be find to give a appropriate error.

Problem solved, thanks for all of your help. it was indeed an email address validation issue. I forgot that I changed my GitHub primary email address some time ago and didn't verify it. I suggest you guys could show us a specific error message for this issue. thanks again. (please ignore my broken English :p )

QIUZAIYOU avatar Sep 28 '21 01:09 QIUZAIYOU

I updated the server a few minutes ago. Thank you @Gusted for fixing the issue, and thank you @QIUZAIYOU for letting us know about this edge-case. 🎉

vednoc avatar Sep 29 '21 05:09 vednoc

Hi, not sure if it's related to this issue (sorry if it isn't), but since today I'm no longer able to login via github. The json displayed is the same {"error": "bad endpoint"}, but the querystring to /api/callback/ seems to suggest there's an invalid redirect_uri: https://userstyles.world/api/callback/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch&state=<redacted>

Parnassius avatar Sep 29 '21 12:09 Parnassius

@vednoc redirect_uri=http://localhost:37531/api/callback/ It seems like the baseURI is not working correctly?

Gusted avatar Sep 29 '21 12:09 Gusted

I think I have an idea why that is. Investigating.

vednoc avatar Sep 29 '21 13:09 vednoc

The fix is now live. Thank you @Parnassius for reporting this issue. 🎉

vednoc avatar Sep 29 '21 14:09 vednoc

Can confirm logging in now works again, thanks for the quick fix!

Parnassius avatar Sep 29 '21 14:09 Parnassius