httpx-oauth icon indicating copy to clipboard operation
httpx-oauth copied to clipboard

Github provider is hard coded to use the first email instead of the primary if no public one exists.

Open lloesche opened this issue 1 year ago • 0 comments

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}]

lloesche avatar Jan 31 '24 17:01 lloesche