Skip to content

Commit

Permalink
fix: improve token verification
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Sep 17, 2023
1 parent 06c2659 commit 1a36808
Show file tree
Hide file tree
Showing 9 changed files with 919 additions and 33 deletions.
5 changes: 4 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<div>
<NuxtWelcome />
<NuxtLoadingIndicator />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</template>
31 changes: 29 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
'nuxt-vuefire',
],

vuefire: {
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',
},

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

// appCheck: {
// debug: true,
// isTokenAutoRefreshEnabled: true,
// provider: 'ReCaptchaEnterprise',
// key: '6LfNWy8oAAAAAG9GdaqR-X8t8721YyHyILD_C6Pu',
// },
},

runtimeConfig: {
turso: {
url: '' || process.env.TURSO_URL,
authToken: '' || process.env.TURSO_AUTH_TOKEN,
},
firebase: {
config: '' || process.env.FIREBASE_CONFIG,
databaseUrl: 'https://sstaa-app-default-rtdb.asia-southeast1.firebasedatabase.app' || process.env.FIREBASE_DATABASE_URL,
projectId: 'sstaa-app' || process.env.FIREBASE_PROJECT_ID,
},
},
})
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@
},
"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",
"dotenv": "^16.3.1",
"drizzle-kit": "^0.19.13",
"drizzle-orm": "^0.28.6",
"eslint": "^8.49.0",
"firebase": "^10.4.0",
"firebase-admin": "^11.10.1",
"nuxt": "^3.7.3"
"firebase-functions": "^4.4.1",
"nuxt": "^3.7.3",
"nuxt-vuefire": "^0.3.0",
"vuefire": "^3.1.17",
"web-auth-library": "^1.0.3"
}
}
9 changes: 9 additions & 0 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts">
const user = useCurrentUser()
</script>

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

0 comments on commit 1a36808

Please # to comment.