abcxyz / team-link

Apache License 2.0
1 stars 0 forks source link

feat: retrieve GitHub user name given user email (with SSO) #3

Open sqin2019 opened 7 months ago

sqin2019 commented 7 months ago

We should be able to get the info with https://docs.github.com/en/graphql/reference/objects#externalidentitysamlattributes.

sqin2019 commented 7 months ago

retrieve flow: 1. get all external identities and mapped github users -> 2. search the external identity that has an email attribute same as the given one -> 3. get the user id of the external identity and username/login. one idea is to store the mapping of 1 (email to github user id), fetch the user id given email, and query github api to get the username each time we do the sync.

sqin2019 commented 7 months ago

MVP - use internal mapping system instead.