Skip to content

Commit

Permalink
fix(variables): centralize some variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hutchic committed Jul 19, 2024
1 parent 6db99ba commit 31fd5c7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions app/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ export default defineNuxtConfig({
ssr: false,
devtools: { enabled: true },
modules: ["@nuxt/ui", "@vite-pwa/nuxt", "nuxt-vue3-google-signin"],
googleSignIn: {
clientId: '753759858538-nufcl1qbhf9gpc7v9qs4seramd7ni2rm.apps.googleusercontent.com',
},
pwa: {
manifest: {
name: 'Boat Sharing App',
Expand Down Expand Up @@ -44,7 +41,8 @@ export default defineNuxtConfig({
},
runtimeConfig: {
public: {
googleCalendarId: '7417fba20bb0d2c726dba1575d7d6421014047d0dbfe15875c8dd3588796f8c6@group.calendar.google.com'
googleCalendarId: '7417fba20bb0d2c726dba1575d7d6421014047d0dbfe15875c8dd3588796f8c6@group.calendar.google.com',
oauthClientId: '753759858538-nufcl1qbhf9gpc7v9qs4seramd7ni2rm.apps.googleusercontent.com',
}
},
vite: {
Expand Down
4 changes: 3 additions & 1 deletion app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ const handleOnError = (errorResponse: AuthCodeFlowErrorResponse) => {
console.log('Error: ', errorResponse);
};
const config = useRuntimeConfig()
const { login } = useTokenClient({
client_id: '753759858538-nufcl1qbhf9gpc7v9qs4seramd7ni2rm.apps.googleusercontent.com',
client_id: config.public.oauthClientId,
scope: 'profile email https://www.googleapis.com/auth/calendar',
prompt: 'consent',
onSuccess: handleOnSuccess,
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ services:
image: ngrok/ngrok
environment:
NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN}
command: http --domain=boatapp.ngrok.dev nuxt:3000
command: http --domain=${NGROK_DOMAIN} nuxt:3000
ports:
- "4040:4040"
1 change: 1 addition & 0 deletions env.template
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
NGROK_AUTHTOKEN=your-ngrok-auth-token
NGROK_DOMAIN=xxx

0 comments on commit 31fd5c7

Please sign in to comment.