Skip to content

Commit

Permalink
feat: clean up firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Sep 19, 2023
1 parent 39f549c commit 58049b5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1,242 deletions.
32 changes: 17 additions & 15 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
import { isDevelopment } from 'std-env'

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: false, // Firebase
devtools: { enabled: true },

ssr: false, // Firebase *sighs*

modules: [
'nuxt-vuefire',
],

vuefire: {
emulators: false,

config: {
apiKey: 'AIzaSyC0JXbZ3JWmKC-cEaK3bUl8sQO1lShM1GA',
authDomain: 'sstaa-app.firebaseapp.com',
databaseURL: 'https://sstaa-app-default-rtdb.asia-southeast1.firebasedatabase.app',
projectId: 'sstaa-app',
storageBucket: 'sstaa-app.appspot.com',
messagingSenderId: '717632543205',
appId: '1:717632543205:web:e7918e4133d4cc209cf70c',
projectId: 'sstaa-app' || process.env.FIREBASE_PROJECT_ID,
apiKey: 'AIzaSyC0JXbZ3JWmKC-cEaK3bUl8sQO1lShM1GA' || process.env.FIREBASE_API_KEY,
authDomain: 'sstaa-app.firebaseapp.com' || process.env.FIREBASE_AUTH_DOMAIN,
databaseURL: 'https://sstaa-app-default-rtdb.asia-southeast1.firebasedatabase.app' || process.env.FIREBASE_DATABASE_URL,
storageBucket: 'sstaa-app.appspot.com' || process.env.FIREBASE_STORAGE_BUCKET,
messagingSenderId: '717632543205' || process.env.FIREBASE_MESSAGING_SENDER_ID,
appId: '1:717632543205:web:e7918e4133d4cc209cf70c' || process.env.FIREBASE_APP_ID,
},

auth: {
enabled: true,
sessionCookie: true,
},

appCheck: {
debug: process.env.FIREBASE_APP_CHECK_DEBUG_TOKEN || process.env.NODE_ENV !== 'production',
debug: process.env.FIREBASE_APP_CHECK_DEBUG_TOKEN || isDevelopment,
provider: 'ReCaptchaEnterprise' || process.env.FIREBASE_APP_CHECK_PROVIDER,
key: '6LfNWy8oAAAAAG9GdaqR-X8t8721YyHyILD_C6Pu' || process.env.FIREBASE_APP_CHECK_KEY,
isTokenAutoRefreshEnabled: true,
provider: 'ReCaptchaEnterprise',
key: '6LfNWy8oAAAAAG9GdaqR-X8t8721YyHyILD_C6Pu',
},
},

Expand All @@ -37,8 +39,8 @@ export default defineNuxtConfig({
url: '' || process.env.TURSO_URL,
authToken: '' || process.env.TURSO_AUTH_TOKEN,
},
firebase: {
projectId: 'sstaa-app' || process.env.FIREBASE_PROJECT_ID,

firebaseAppCheck: {
},
},
})
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"devDependencies": {
"@antfu/eslint-config": "^0.42.0",
"@firebase/app-types": "^0.9.0",
"@libsql/client": "^0.3.4",
"@nuxt/devtools": "latest",
"@paralleldrive/cuid2": "^2.2.2",
Expand All @@ -24,8 +23,6 @@
"drizzle-orm": "^0.28.6",
"eslint": "^8.49.0",
"firebase": "^10.4.0",
"firebase-admin": "^11.10.1",
"firebase-functions": "^4.4.1",
"nuxt": "^3.7.3",
"nuxt-vuefire": "^0.3.0",
"vuefire": "^3.1.17",
Expand Down
4 changes: 1 addition & 3 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ const user = useCurrentUser()
</script>

<template>
<div>
{{ user }}
</div>
<div>{{ user }}</div>
</template>
Loading

0 comments on commit 58049b5

Please # to comment.