Integrate Firebase App Check
This commit is contained in:
@@ -57,6 +57,10 @@ export default {
|
||||
middleware: 'auth'
|
||||
},
|
||||
|
||||
env: {
|
||||
firebaseAppCheckDebugToken: process.env.NODE_ENV !== 'production'
|
||||
},
|
||||
|
||||
// Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
|
||||
vuetify: {
|
||||
customVariables: ['~/assets/variables.scss'],
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { initializeApp } from 'firebase/app'
|
||||
import { getAuth } from 'firebase/auth'
|
||||
import { getFirestore } from 'firebase/firestore'
|
||||
import { initializeAppCheck, ReCaptchaV3Provider } from 'firebase/app-check'
|
||||
|
||||
// Firebase configuration
|
||||
const firebaseConfig = {
|
||||
@@ -15,6 +16,14 @@ const firebaseConfig = {
|
||||
// Initialize Firebase
|
||||
const app = initializeApp(firebaseConfig)
|
||||
|
||||
// Initialize Firebase App Check
|
||||
self.FIREBASE_APPCHECK_DEBUG_TOKEN = process.env.firebaseAppCheckDebugToken
|
||||
initializeAppCheck(app, {
|
||||
provider: new ReCaptchaV3Provider('6LcrDqoiAAAAALVT6mjDGTj8EMjukfkQJqxnZ2SA'),
|
||||
// Optional argument. If true, the SDK automatically refreshes App Check tokens as needed.
|
||||
isTokenAutoRefreshEnabled: true
|
||||
})
|
||||
|
||||
// Initialize Firebase Authentication and get a reference to the service
|
||||
const auth = getAuth(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user