This is the template and sample code using Github API for creating a custom authentication provider in Salesforce.