I think WebApps is a better fit for the question for sure. If I happened upon a question like this organically on Stack Overflow, and weren't currently prioritizing a cleanup of old Python questions, I would vote to close it as off topic.
Topicality on Stack Overflow generally requires a question that is about at least one of
- a specific programming problem
- a software algorithm
- software tools commonly used by programmers
and is also
a practical, answerable problem that is unique to software development
That's how the "and" and "or"s in that description are intended to be parsed.
Now, GitHub is established to be a "software tool commonly used by programmers" - there are about 57 thousand questions under that tag on Stack Overflow - so you're covered on the first part. It's also clear that the problem is practical (because authenticating with a website is a common task) and answerable (because you answered it quite well).
However, just because you are authenticating with a website used uniquely by software developers, doesn't make the problem of authenticating with a website (i.e., by ordinary end-user means, not by writing a program that uses some OAuth API or whatever) unique to software development.
In my mind, this is the same as if you were asking about the same problem logging in with your phone (while posting from a desktop) to Stack Overflow itself. Even though Stack Overflow itself is specifically used by developers, such a question would clearly belong on meta.SO and would not be accepted on the main site. That is, it would go on a site that's about Stack Overflow, rather than on a site that's about programming. Similarly, I think your question and answer belong on a site that's about GitHub qua webapp, because the question fundamentally views GitHub from that perspective. It's neither about authentication in a programming sense, nor about using GitHub specifically for a programming-related task.