sponsors
sponsors copied to clipboard
Implement a check to see if a username and token belong together
For our Sponsorable trait we offer to set a GitHub username and token on the implementing class. But we don't actually check if the user or the token belong together. It would be good if we offered a way to users to do this or to either do this ourselves in the library before making API requests.
The way we could check this is to auth the client with the token and retrieve the user details, then check if the username is the same as the one set on the object.