GoogleChrome / GoogleChrome/webstatus.dev
[ENHANCEMENT] Display GitHub username instead of GitHub email
- Dominant language
- Go
- Stars
- 254
- Forks
- 62
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 64
Description
**Is your feature request related to a problem? Please describe.**
After a user logs in, it shows their email address. But it would be better to show their GitHub username.
**Describe the solution you'd like**
Background: Given GCP Cloud Identity Platform is meant to be very generic, we will have to do some additional steps as mentioned in these docs [[1](https://stackoverflow.com/a/69785405)] [[2](https://gist.github.com/andremalveira/f1e59a85ac4713415a9f338c555c04d4)] to actually get the username.
- Create our own internal User type that is used inside the User [context](https://github.com/GoogleChrome/webstatus.dev/blob/857cb18d57dd9d3c2771291ef6505dcc57bc28cf/frontend/src/static/js/contexts/firebase-user-context.ts). It should extend the current User and then have a new high level field called GitHubUsername. which is string or null.
- Create a lit task that is created and started within the onAuthStateChanged [callback](https://github.com/GoogleChrome/webstatus.dev/blob/857cb18d57dd9d3c2771291ef6505dcc57bc28cf/frontend/src/static/js/services/webstatus-firebase-auth-service.ts#L87-L89).
- The playwright [test](https://github.com/GoogleChrome/webstatus.dev/blob/857cb18d57dd9d3c2771291ef6505dcc57bc28cf/e2e/tests/login.spec.ts) will need to be modified to intercept a call to the GitHub API to return a fake username.
Contributor guide
Assessment
This issue has not been assessed yet.