Skip to content

Commit

Permalink
Merge pull request #234 from LaurierHawkHacks/revert-232-main
Browse files Browse the repository at this point in the history
Revert "Prod Deployments For AppCheck/ReCaptcha"
  • Loading branch information
juancwu authored Apr 9, 2024
2 parents 47dec93 + c3196d6 commit 2758341
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 35 deletions.
1 change: 0 additions & 1 deletion .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
- live
jobs:
build_and_deploy:
if: ${{ false }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- live
jobs:
build_and_preview:
if: ${{ false }}
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion config/storage.rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ service firebase.storage {
match /resumes/{resumeId} {
// allow read if owner or admin
allow read: if request.auth != null && resource.metadata.owner == request.auth.uid || request.auth.token.admin == true;
allow write: if request.auth != null && request.resource.size <= 10 * 1024 * 1024;
allow write: if request.auth != null;
}

match /{allPaths=**} {
Expand Down
6 changes: 6 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
"firestore": {
"port": 8080
},
"hosting": {
"port": 5000
},
"pubsub": {
"port": 8085
},
"storage": {
"port": 9199
},
Expand Down
46 changes: 20 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./src/assets/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="HawkHacks Hacker Portal" />
<meta
name="keywords"
content="hawkhacks, hawkhacks portal, hakwhacks dashboard, my hawkhacks, wilfrid laurier hackathon"
/>
<title>HawkHacks | Dashboard</title>

<meta property="og:title" content="HawkHacks" />
<meta property="og:site_name" content="HawkHacks" />
<meta
property="og:description"
content="Wilfrid Laurier's first large-scale global hackathon!"
/>
<meta property="og:url" content="https://hawkhacks.ca/" />
<meta property="og:locale" content="en_CA" />
<meta property="og:locale:alternate" content="en_GB" />
<meta property="og:locale:alternate" content="en_US" />
</head>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./src/assets/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HawkHacks | Dashboard</title>

<meta property="og:title" content="HawkHacks" />
<meta property="og:site_name" content="HawkHacks" />
<meta property="og:description" content="Wilfrid Laurier's first large-scale global hackathon!" />
<meta property="og:url" content="https://hawkhacks.ca/" />
<meta property="og:locale" content="en_CA" />
<meta property="og:locale:alternate" content="en_GB" />
<meta property="og:locale:alternate" content="en_US" />
</head>

<body>
<div id="root"></div>
<div id="notifications"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

<body>
<div id="root"></div>
<div id="notifications"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
5 changes: 0 additions & 5 deletions src/services/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { getAnalytics } from "firebase/analytics";
import { connectAuthEmulator, getAuth } from "firebase/auth";
import { connectFunctionsEmulator, getFunctions } from "firebase/functions";
import { connectStorageEmulator, getStorage } from "firebase/storage";
import { ReCaptchaV3Provider, initializeAppCheck } from "firebase/app-check";

const firebaseConfig = {
apiKey: import.meta.env.VITE_FIREBASE_API_KEY,
Expand All @@ -22,10 +21,6 @@ export const firestore = getFirestore(app);
export const auth = getAuth(app);
export const functions = getFunctions(app);
export const storage = getStorage(app);
initializeAppCheck(app, {
provider: new ReCaptchaV3Provider(import.meta.env.VITE_APP_CHECK_KEY),
isTokenAutoRefreshEnabled: true,
});

// connect to emulators if not in prod
if (!import.meta.env.PROD) {
Expand Down
1 change: 0 additions & 1 deletion src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ interface ImportMetaEnv {
VITE_CONNECT_AUTH_EMU: string;
VITE_GOOGLE_CLIENT_ID: string;
VITE_APP_VERSION: string;
VITE_APP_CHECK_KEY: string;
}

0 comments on commit 2758341

Please sign in to comment.