콘솔로 이동

GitHub auth provider.

GitHub requires an OAuth 2.0 redirect, so you can either handle the redirect directly, or use the signInWithPopup handler:

example
// Using a redirect.
firebase.auth().getRedirectResult().then(function(result) {
  if (result.credential) {
    // This gives you a GitHub Access Token.
    var token = result.credential.accessToken;
  }
  var user = result.user;
}).catch(function(error) {
  // Handle Errors here.
  var errorCode = error.code