Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/samvritsrinath firebase auth #18

Merged
merged 34 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
052556e
Generate Branch for Firebase
SamvritSrinath Jan 23, 2024
9bb2c08
random frontend testing + set up user mongo model
HarshGurnani Jan 23, 2024
6644faa
created file for custom errors + started backend firebase setup
HarshGurnani Jan 23, 2024
4e7d27e
Basic firebase scheme
SamvritSrinath Jan 23, 2024
778d3e9
Resolved merge
SamvritSrinath Jan 23, 2024
4114bcf
Scaffolding for Login Page
SamvritSrinath Jan 28, 2024
e68bd26
added function to decode auth token
HarshGurnani Jan 28, 2024
ac2d186
merged branch changes
HarshGurnani Jan 28, 2024
01289fb
firebase running on frontend, bug: hitting login button is not callin…
HarshGurnani Jan 30, 2024
1e4b817
made text input field a reusable component
HarshGurnani Jan 30, 2024
ea2f483
updated input field + firebase call works on frontend
HarshGurnani Jan 30, 2024
9b9ad35
minor code clean up
HarshGurnani Jan 30, 2024
d5b72f9
created backend route for getting user -error: appears as if route is…
HarshGurnani Jan 30, 2024
f69e8cf
firebase auth fully functional. to-do: send both firebase uid and mon…
Feb 4, 2024
dfb0f71
added mongoId to API route - ready for PR
Feb 4, 2024
7fa95eb
moved logo up
Feb 11, 2024
8d14c57
linting
Feb 11, 2024
66695d9
Merge branch 'main' into feat/samvritsrinath-firebase_auth
Feb 11, 2024
d5c0d7b
fixed env issues
Feb 12, 2024
0b98cf9
changed some routing
Feb 13, 2024
8ee1281
linting issue
Feb 13, 2024
47c0754
Fixing Imports for Lint Check
SamvritSrinath Feb 13, 2024
05e2056
Modifying Imports
SamvritSrinath Feb 14, 2024
2a0fc7f
Use cleanEnv for env vars & add secrets to GH actions
benjaminJohnson2204 Feb 14, 2024
ca19e8d
Fix syntax issue in GH actions yml file
benjaminJohnson2204 Feb 14, 2024
7ad2ef4
Add env vars for backend to GH actions yml file
benjaminJohnson2204 Feb 14, 2024
d06fc7a
Add env variables to GH actions unit tests yml
benjaminJohnson2204 Feb 14, 2024
10c52bd
Add env variables to GH actions unit tests yml
benjaminJohnson2204 Feb 14, 2024
45cab02
Fix unit tests GH actions yml
benjaminJohnson2204 Feb 15, 2024
7a58c9b
Trigger re-run of GH actions
benjaminJohnson2204 Feb 15, 2024
1b4e849
Fix env var issues in frontend and backend
benjaminJohnson2204 Feb 15, 2024
8b93888
addressed changes
Feb 15, 2024
32e80b6
removed unnecssary comments and console statements
Feb 15, 2024
cdef6e2
Fix light vs dark theme issues with login page
benjaminJohnson2204 Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/lint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Lint, style, and compilation checks

on:
pull_request:
branches:
branches:
- main

jobs:
Expand All @@ -16,6 +16,16 @@ jobs:
run: |
npm ci
npm run lint-check
env:
PORT: ${{ secrets.PORT }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
FRONTEND_ORIGIN: ${{ secrets.FRONTEND_ORIGIN }}
EMAIL_USER: ${{ secrets.EMAIL_USER }}
EMAIL_APP_PASSWORD: ${{ secrets.EMAIL_APP_PASSWORD }}
EMAIL_NOTIFICATIONS_RECIPIENT: ${{ secrets.EMAIL_NOTIFICATIONS_RECIPIENT }}
BACKEND_FIREBASE_SETTINGS: ${{ secrets.BACKEND_FIREBASE_SETTINGS }}
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }}

frontend:
name: Frontend check
runs-on: ubuntu-latest
Expand All @@ -27,3 +37,6 @@ jobs:
npm ci
npm run lint-check
npm run build
env:
NEXT_PUBLIC_BACKEND_URL: ${{ secrets.NEXT_PUBLIC_BACKEND_URL }}
NEXT_PUBLIC_FIREBASE_SETTINGS: ${{ secrets.NEXT_PUBLIC_FIREBASE_SETTINGS }}
22 changes: 17 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Run frontend & backend unit tests
on:
pull_request:
branches:
branches:
- main

jobs:
backend:
name: Backend tests
Expand All @@ -12,11 +13,20 @@ jobs:
- uses: actions/setup-node@v3
- name: Run tests
working-directory: backend
env:
CI: true
run: |
npm ci
npm run test
env:
CI: true
PORT: ${{ secrets.PORT }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
FRONTEND_ORIGIN: ${{ secrets.FRONTEND_ORIGIN }}
EMAIL_USER: ${{ secrets.EMAIL_USER }}
EMAIL_APP_PASSWORD: ${{ secrets.EMAIL_APP_PASSWORD }}
EMAIL_NOTIFICATIONS_RECIPIENT: ${{ secrets.EMAIL_NOTIFICATIONS_RECIPIENT }}
BACKEND_FIREBASE_SETTINGS: ${{ secrets.BACKEND_FIREBASE_SETTINGS }}
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }}

frontend:
name: Frontend tests
runs-on: ubuntu-latest
Expand All @@ -25,8 +35,10 @@ jobs:
- uses: actions/setup-node@v3
- name: Run tests
working-directory: frontend
env:
CI: true
run: |
npm ci
npm run test
env:
CI: true
NEXT_PUBLIC_BACKEND_URL: ${{ secrets.NEXT_PUBLIC_BACKEND_URL }}
NEXT_PUBLIC_FIREBASE_SETTINGS: ${{ secrets.NEXT_PUBLIC_FIREBASE_SETTINGS }}
17 changes: 9 additions & 8 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Example environment variables for backend. Any "<example>"s should be
# replaced with the real values.
PORT=3001
MONGODB_URI="mongodb://127.0.0.1:27017/pap"
FRONTEND_ORIGIN="http://localhost:3000"
EMAIL_USER="<example>@gmail.com"
EMAIL_APP_PASSWORD="<example>"
BACKEND_FIREBASE_SETTINGS='<example>'
# Example environment variables for backend. Any "<example>"s should be
# replaced with the real values.
PORT=3001
MONGODB_URI="mongodb://127.0.0.1:27017/pap"
FRONTEND_ORIGIN="http://localhost:3000"
EMAIL_USER="<example>@gmail.com"
EMAIL_APP_PASSWORD="<example>"
BACKEND_FIREBASE_SETTINGS='<example>'
SERVICE_ACCOUNT_KEY='<example>'
Loading
Loading