benadida / helios-server

Helios server
http://heliosvoting.org
Apache License 2.0
721 stars 343 forks source link

Show friendlier error on gh login if primary email not verified #328

Open lizthegrey opened 2 years ago

lizthegrey commented 2 years ago

@bhs is unable to log in -- he's had a stub account created because of being uploaded as a voter in https://vote.heliosvoting.org/helios/elections/bbeab1b8-1406-11ec-b980-eacead3a3158/view, but there's an HTTP 500 upon redirect from github. @benadida can you pull logs and help debug? I swear I tested upgrading stub to full account when I did the github auth voter roll mechanism, but apparently it's busted.

bhs commented 2 years ago

If helpful, it looks (?) like the helios app made it as far as getting permissions in my GH account:

image

lizthegrey commented 2 years ago

there's also a user who reports they were able to successfully authenticate. @bhs per chance, is your primary email address not verified by github? I remember there being this bit of code: https://github.com/benadida/helios-server/pull/316/files#diff-256447901fc51a8777ad40107191df25f5c4e2258435b5f8f2437823884943b0R53

bhs commented 2 years ago

All good now, thank you, Liz!

image

bhs commented 2 years ago

I'll let you decide if we close this issue now or add some sort of non-500 error message first.

lizthegrey commented 2 years ago

Update: yup, that was it, it's working as intended. if you're seeing an error, you need to go to https://github.com/settings/emails and verify your primary email. Going to change this issue title to be "this should offer a better error UX"