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

fix(SILVA-546): fixing amplify authentication #441

Merged
merged 37 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a5b3b3e
chore(SILVA-546): changing amplify lib
paulushcgcj Nov 1, 2024
bcbafa1
fix(SILVA-546): configuring amplify
paulushcgcj Nov 1, 2024
fe0a4ff
fix(SILVA-546): creating auto provider to handle authentication
paulushcgcj Nov 1, 2024
d9562bb
chore(SILVA-546): trimmed auth service and store
paulushcgcj Nov 1, 2024
0a9eeb0
chore(SILVA-546): migrating to react router data api
paulushcgcj Nov 1, 2024
964b2a7
fix(SILVA-546): updated landing to reflect new code
paulushcgcj Nov 1, 2024
dde5281
fix(SILVA-546): updated my profile to reflect new auth
paulushcgcj Nov 1, 2024
bef5b68
fix(SILVA-546): updated protected route and remove post login route
paulushcgcj Nov 1, 2024
442f10b
fix(SILVA-546): updated dashboard redirect
paulushcgcj Nov 1, 2024
16a1344
feat(SILVA-546): added initial error handler screen
paulushcgcj Nov 1, 2024
91c357a
fix: fixed error on opening screen for tab selector
paulushcgcj Nov 1, 2024
cc1f76e
chore: removed unused file
paulushcgcj Nov 1, 2024
29c4ae2
chore: trimmed down OrganizationSelection
paulushcgcj Nov 1, 2024
62393c4
Merge branch 'main' into fix/SILVA-546
paulushcgcj Nov 1, 2024
421e439
Merge branch 'main' into fix/SILVA-546
paulushcgcj Nov 4, 2024
c16ac81
fix: fixing import
paulushcgcj Nov 4, 2024
a486640
test: fixing tests
paulushcgcj Nov 4, 2024
cc23d98
chore: updating package-lock
paulushcgcj Nov 4, 2024
06f7012
chore: fixing sonar issues
paulushcgcj Nov 4, 2024
6bb2353
chore: fixing sonar issues
paulushcgcj Nov 4, 2024
d42c454
chore: fixing sonar issues
paulushcgcj Nov 4, 2024
9fb6c8c
test: added test to MyProfile
paulushcgcj Nov 4, 2024
4738e2b
chore: simplified AuthProvider
paulushcgcj Nov 4, 2024
8e63511
test: added AuthProvider test
paulushcgcj Nov 4, 2024
81274e2
chore: AuthProvider test update
paulushcgcj Nov 4, 2024
975adb5
test: added test to AuthService
paulushcgcj Nov 4, 2024
a55d471
test: added famUtils test
paulushcgcj Nov 4, 2024
784f8ac
test: added userAction test
paulushcgcj Nov 4, 2024
3d5ddcf
test: added ProtectedRoute test
paulushcgcj Nov 4, 2024
28aeb24
tests: added test to DashboardRedirect
paulushcgcj Nov 4, 2024
e62cfbd
test: added test to ErrorHandling
paulushcgcj Nov 4, 2024
93e502a
test: added Landing test
paulushcgcj Nov 4, 2024
30d55d2
test: added index test
paulushcgcj Nov 4, 2024
b6b0505
chore: adding env vars
paulushcgcj Nov 4, 2024
f99f339
chore: changing test value
paulushcgcj Nov 4, 2024
83280da
ci: adding variable that was hardcoded before
paulushcgcj Nov 4, 2024
150b504
chore: adding param to caddy
paulushcgcj Nov 4, 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
5 changes: 5 additions & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: bcgov-nr/[email protected]
env:
VITE_ZONE: test
VITE_USER_POOLS_ID: ca-central-1_abc123
VITE_USER_POOLS_WEB_CLIENT_ID: abc123
VITE_BACKEND_URL: http://localhost:8080
with:
commands: |
npm ci
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
-p POSTGRES_DB_PASSWORD='${{ secrets.POSTGRES_DB_PASSWORD }}'
-p FORESTCLIENTAPI_KEY='${{ secrets.FORESTCLIENTAPI_KEY }}'
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p VITE_USER_POOLS_ID=${{ vars.VITE_USER_POOLS_ID }}
-p ZONE=test

deploys-test:
Expand Down Expand Up @@ -106,6 +107,7 @@ jobs:
-p POSTGRES_DB_PASSWORD='${{ secrets.POSTGRES_DB_PASSWORD }}'
-p FORESTCLIENTAPI_KEY='${{ secrets.FORESTCLIENTAPI_KEY }}'
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p VITE_USER_POOLS_ID=${{ vars.VITE_USER_POOLS_ID }}
-p ZONE=prod

image-promotions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
-p POSTGRES_DB_PASSWORD='${{ secrets.POSTGRES_DB_PASSWORD }}'
-p FORESTCLIENTAPI_KEY='${{ secrets.FORESTCLIENTAPI_KEY }}'
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p VITE_USER_POOLS_ID=${{ vars.VITE_USER_POOLS_ID }}
triggers: ('common/' 'backend/' 'frontend/')

builds:
Expand Down
4 changes: 4 additions & 0 deletions common/openshift.init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ parameters:
- name: VITE_USER_POOLS_WEB_CLIENT_ID
description: Cognito user pools web client ID
required: true
- name: VITE_USER_POOLS_ID
description: Cognito user pools ID
required: true
objects:
- apiVersion: v1
kind: Secret
Expand Down Expand Up @@ -95,6 +98,7 @@ objects:
app: ${NAME}-${ZONE}
stringData:
vite-user-pools-web-client-id: ${VITE_USER_POOLS_WEB_CLIENT_ID}
vite-user-pools-id: ${VITE_USER_POOLS_ID}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion frontend/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
handle /env.js {
header Content-Type "text/javascript"
respond `window.config = {"VITE_USER_POOLS_WEB_CLIENT_ID":"{$VITE_USER_POOLS_WEB_CLIENT_ID}","VITE_ZONE":"{$VITE_ZONE}","VITE_BACKEND_URL":"{$VITE_BACKEND_URL}"};`
respond `window.config = {"VITE_USER_POOLS_ID":"{$VITE_USER_POOLS_ID}","VITE_USER_POOLS_WEB_CLIENT_ID":"{$VITE_USER_POOLS_WEB_CLIENT_ID}","VITE_ZONE":"{$VITE_ZONE}","VITE_BACKEND_URL":"{$VITE_BACKEND_URL}"};`
}

handle_path /* {
Expand Down
5 changes: 5 additions & 0 deletions frontend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ objects:
secretKeyRef:
name: ${NAME}-${ZONE}-frontend
key: vite-user-pools-web-client-id
- name: VITE_USER_POOLS_ID
valueFrom:
secretKeyRef:
name: ${NAME}-${ZONE}-frontend
key: vite-user-pools-id
ports:
- containerPort: 3000
protocol: TCP
Expand Down
Loading
Loading