benadida / helios-server

Helios server

Home Page:http://heliosvoting.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show friendlier error on gh login if primary email not verified

lizthegrey opened this issue · comments

@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.

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

image

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

All good now, thank you, Liz!

image

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

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"