Skip to content

Commit 6699a53

Browse files
committed
lint fix 3
1 parent cf9e205 commit 6699a53

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

auth-next/oidc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function oidcSignInPopup(provider) {
1717
signInWithPopup(auth, provider)
1818
.then((result) => {
1919
// User is signed in.
20-
credential = OAuthProvider.credentialFromResult(result);
20+
const credential = OAuthProvider.credentialFromResult(result);
2121
// This gives you an access token for the OIDC provider. You can use it to directly interact with that provider
2222
}).catch((error) => {
2323
// Handle Errors here.
@@ -50,7 +50,7 @@ function oidcSignInRedirectResult(provider) {
5050
getRedirectResult(auth)
5151
.then((result) => {
5252
// User is signed in.
53-
credential = OAuthProvider.credentialFromResult(result);
53+
const credential = OAuthProvider.credentialFromResult(result);
5454
// This gives you an access token for the OIDC provider. You can use it to directly interact with that provider
5555
})
5656
.catch((error) => {
@@ -69,7 +69,7 @@ function oidcSignInRedirectResult(provider) {
6969

7070
function oidcDirectSignIn(provider, oidcIdToken) {
7171
// [START auth_oidc_direct_sign_in]
72-
const { getAuth, OAuthProvider } = require("firebase/auth");
72+
const { getAuth, OAuthProvider, signInWithCredential } = require("firebase/auth");
7373

7474
const auth = getAuth();
7575
const credential = provider.credential({

auth/oidc.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// These samples are intended for Web so this import would normally be
2+
// done in HTML however using modules here is more convenient for
3+
// ensuring sample correctness offline.
4+
import firebase from "firebase/app";
5+
import "firebase/auth";
6+
17
// [SNIPPET_REGISTRY disabled]
28
// [SNIPPETS_SEPARATION enabled]
39

@@ -12,7 +18,7 @@ function oidcSignInPopup(provider) {
1218
firebase.auth().signInWithPopup(provider)
1319
.then((result) => {
1420
// User is signed in.
15-
// result.credential is a firebase.auth.OAuthCredential object.
21+
// result.credential is a firebase.auth().OAuthCredential object.
1622
// result.credential.providerId is equal to 'oidc.myProvider'.
1723
// result.credential.idToken is the OIDC provider's ID token.
1824
})
@@ -36,7 +42,7 @@ function oidcSignInRedirectResult(provider) {
3642
firebase.auth().getRedirectResult()
3743
.then((result) => {
3844
// User is signed in.
39-
// result.credential is a firebase.auth.OAuthCredential object.
45+
// result.credential is a firebase.auth().OAuthCredential object.
4046
// result.credential.providerId is equal to 'oidc.myProvider'.
4147
// result.credential.idToken is the OIDC provider's ID token.
4248
})

auth/saml.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// These samples are intended for Web so this import would normally be
2+
// done in HTML however using modules here is more convenient for
3+
// ensuring sample correctness offline.
4+
import firebase from "firebase/app";
5+
import "firebase/auth";
6+
17
// [SNIPPET_REGISTRY disabled]
28
// [SNIPPETS_SEPARATION enabled]
39

0 commit comments

Comments
 (0)