# Github OAuth * [New docs](https://firebase.google.com/docs/auth/web/github-auth) * [Old docs](https://www.firebase.com/docs/web/guide/login/github.html) ## Sign In with Popup *New API* ```js var provider = new firebase.auth.GithubAuthProvider(); provider.addScope('repo'); firebase.auth().signInWithPopup(provider).then(function(result) { console.log(result); }).catch(function(error) { console.log(error); }); ``` ## Sign In with Redirect *New API* ```js var provider = new firebase.auth.GithubAuthProvider(); provider.addScope('repo'); firebase.auth().signInWithRedirect(provider); firebase.auth().getRedirectResult().then(function(authData) { console.log(authData); }).catch(function(error) { console.log(error); }); ``` ## Sign Out *New API* ```js firebase.auth().signOut().then(function() { // Sign-out successful. }, function(error) { console.log(error); }); ```