Skip to content

Commit d5f652d

Browse files
committed
Add missing GitHub snippet
1 parent a808a4b commit d5f652d

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

auth-next/github.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ function githubProvider() {
2727
// [END auth_github_provider_params]
2828
}
2929

30+
function githubProviderCredential(token) {
31+
// [START auth_github_provider_credential]
32+
const { GithubAuthProvider } = require("firebase/auth");
33+
34+
const credential = GithubAuthProvider.credential(token);
35+
// [END auth_github_provider_credential]
36+
}
37+
3038
function githubSignInPopup(provider) {
3139
// [START auth_github_signin_popup]
3240
const { getAuth, signInWithPopup, GithubAuthProvider } = require("firebase/auth");

auth/github.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ function githubProvider() {
2020
// [END auth_github_provider_params]
2121
}
2222

23+
function githubProviderCredential(token) {
24+
// [START auth_github_provider_credential]
25+
var credential = firebase.auth.GithubAuthProvider.credential(token);
26+
// [END auth_github_provider_credential]
27+
}
28+
2329
function githubSignInPopup(provider) {
2430
// [START auth_github_signin_popup]
2531
firebase
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This snippet file was generated by processing the source file:
2+
// ./auth-next/github.js
3+
//
4+
// To make edits to the snippets in this file, please edit the source
5+
6+
// [START auth_github_provider_credential_modular]
7+
import { GithubAuthProvider } from "firebase/auth";
8+
9+
const credential = GithubAuthProvider.credential(token);
10+
// [END auth_github_provider_credential_modular]

0 commit comments

Comments
 (0)