React component for GitHub login.
importReactfrom'react';importReactDOMfrom'react-dom';importGitHubLoginfrom'react-github-login';constonSuccess=response=>console.log(response);constonFailure=response=>console.error(response);ReactDOM.render(<GitHubLoginclientId="ac56fad434a3a3c1561e"onSuccess={onSuccess}onFailure={onFailure}/>,document.getElementById('example'));{string}required
Client ID for GitHub OAuth application.
{string}
Registered redirect URI for GitHub OAuth application.
{string}
Scope for GitHub OAuth application. Defaults to user:email.
{string}
CSS class for the login button.
{string}
Text content for the login button.
{function}
Callback for every request.
{function}
Callback for successful login. An object will be passed as an argument to the callback, e.g. { "code": "..." }.
{function}
Callback for errors raised during login.
$ npm startWebpack development server starts at http://localhost:8080, loading example/index.html.