sifatul / codies

An open source project to track profiles of developers and show their info in a single page so that recruiters/peer developers do not have to visit many different platform
https://find-profile.vercel.app/
MIT License
15 stars 14 forks source link

keep github and google token unique in user schema #83

Open sifatul opened 1 year ago

sifatul commented 1 year ago

in user schema pages/api/users/models/UserSchema.ts :

  1. need to make github_token and google_token unique
  2. but also allow null.
  3. need to update index of the table, google_token and github_token needs to be index

Reasons:

  1. unique: no user's google or github token will be same.
  2. allow null: while user login with google github token will be null.
  3. as for all social login users search would be based on google_token and github_token index needs to be updated for faster response