sahat/megaboilerplate

Github JWT authentication

vcooley opened this issue · 0 comments

With github authentication using JWT and SQL (haven't checked the others), if a user does not have a public email, profile.email is null. This creates a problem if more than one user try to sign up without a public email as emails must be unique.

I fixed this in my code by making a request to the /user/emails endpoint. I'd be happy to share my fix in a PR, but I used promisify-node to promisify request and I'm not sure whether that's ok or not for this project.