httpx-oauth
httpx-oauth copied to clipboard
Github provider is hard coded to use the first email instead of the primary if no public one exists.
Currently in https://github.com/frankie567/httpx-oauth/blob/master/httpx_oauth/clients/github.py#L72 when no public email address is defined it is hard coded to use the first email address instead of the user's primary email address.
The response includes a boolean 'primary': True
[{'email': '[email protected]', 'primary': True, 'verified': True, 'visibility': 'public'}, {'email': '[email protected]', 'primary': False, 'verified': True, 'visibility': None}, {'email': '[email protected]', 'primary': False, 'verified': True, 'visibility': None}, {'email': 'xxxxxxxx@xxxxxxxx', 'primary': False, 'verified': True, 'visibility': None}]