Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

User registration: ask user to provide email if it cannot be retrieved from Github #982

Open
carpodaster opened this issue Apr 23, 2018 · 7 comments

Comments

@carpodaster
Copy link
Member

Users can mark their email address private on their Github profile, making it unavailable for API clients like the one retrieving user data by github handle when a user registers in our site.

If the registration process cannot complete with a valid email address, redirect the user to a form and ask them to provide one.

Note: this may already be implement. Investigate first.

@hola-soy-milk
Copy link
Member

I've done some research and come to some conclusions:

  1. You cannot Oauth on a fresh Github account without a verified email address:
    screen shot 2018-05-02 at 13 32 28

  2. Marking an email address as private still allows this to be imported by the Oauth app

  3. Creating a new account takes the new user to complete their profile.

Given this information, what do you think? I'd almost say that, given the above, we can leave it as is.

@klappradla
Copy link
Member

Oh wow @ramonh 🙇

That's ace! Means the problem of not being able to retrieve an email address actually does not exist at all?

When and under which circumstances was this then originally reported @carpodaster ?

@carpodaster
Copy link
Member Author

Great find, Ramon! 🕵️‍♂️

Maybe it wasn't always the case? I'm pretty we've had reports by orga people that users on the Teams App hat their email address set to nil 🤷‍♂️ I'm closing this.

@emcoding
Copy link
Member

emcoding commented May 3, 2018

When I start a new team, I can add team members that don't exist: partyppooper, or that have a hidden email address: Sandi Metz skmetz.
In both cases we store a user with email address: nil

I know I did something like this for real, when I didn't know Roos yet and I wanted to see what the application form was like. So, it's not a hypothetical case.
Do we (need to) get rid of the fake users?

@hola-soy-milk
Copy link
Member

Ahh! Good point, @F3PiX. I overlooked adding team members. Maybe we should reopen this, huh?

@emcoding
Copy link
Member

emcoding commented May 3, 2018

Well, I don't know by heart what happens when a user added by team members sign in with Gh the first time. (See conv in Slack, I am working on sketching the flow.)
Maybe it is a different issue alltogether - related to cleaning up the database?

@emcoding
Copy link
Member

emcoding commented May 16, 2018

Definitively reopen
Reproduce:

  • Make yourself a team member on the website
  • Add a fake name, for a non existing user (like partypppooper)
  • On the teampage, click on the newly create team members name/github link. => 404
    It is not a valid github name, but is added to our database and as a team member.

In console, check out User.last. See that non of the github fields are populated, except for the fake handle.

  • We use find_or_create_by_github_handle to create a new user. I'd like to investigate if we could change that to github_id, to catch invalid entries.
    TBD later, adding it to the list for User Registration Overhaul: break down #991

@emcoding emcoding reopened this May 16, 2018
@emcoding emcoding mentioned this issue May 26, 2018
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants