chess icon indicating copy to clipboard operation
chess copied to clipboard

issue in Signin with github

Open sandeepky47 opened this issue 2 years ago • 0 comments

Issue: If a user makes his email id private in email setting on his github profile, then we will be getting email=null in profile object which leads to below error based on current authentication logic. image image

  1. May be we can authenticate based on the github username only and creating/updating users accordingly and not storing the email info in db. Need to make email field optional (this don't seem right) Downside - Everytime user changes his uername we have to make enteries in the table.

  2. If we consider to add/insert email (if not null) along with username in db and user change username ex. name -> name1 , as per first approach we need make a new entry with 'username: name1' and email: {duplicate here} which leads to unique constraint error as we are trying to insert same email into different records.

  3. Continue using same authentication logic and insert null email if email not exists. The issue occurs when user try to login again, here we will be fetching records where email=null can lead to update user displayName at multiple places.

Hence we can fallback to 1st approach. If you guys have any suggestions please share. cc @hkirat

Possible fix: image

sandeepky47 avatar Apr 20 '24 12:04 sandeepky47