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

User authentication #333

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
35acc08
adding user add/update/verify functionality
PhillipsOwen Nov 26, 2024
cf35e99
adding a secure random number generator
PhillipsOwen Nov 27, 2024
164b54b
adding paths to the branding and auth locations
PhillipsOwen Nov 27, 2024
e32dadb
adding a default background image
PhillipsOwen Nov 27, 2024
101977a
adding a default background image
PhillipsOwen Nov 27, 2024
ac97dcc
shifting the location of logging out and user profile updating to the…
PhillipsOwen Nov 27, 2024
3392139
completing add user functionality
PhillipsOwen Nov 27, 2024
e6743a5
making the form submit when the enter key is pressed, tidying up
PhillipsOwen Nov 27, 2024
551bab1
exporting the branding so i can use it on the login page
PhillipsOwen Nov 27, 2024
6979264
adding buttins for user profile updating
PhillipsOwen Nov 27, 2024
485c54f
tidying up
PhillipsOwen Nov 27, 2024
b3e8bf1
adding branding, tidying up
PhillipsOwen Nov 27, 2024
7eaa2bf
fixing the way the user profile is saved, tidying up
PhillipsOwen Nov 27, 2024
581bb11
altering the way that user profile is checked (cookie)
PhillipsOwen Nov 27, 2024
c232d32
moving away from local storage, now using cookies
PhillipsOwen Nov 27, 2024
b7918e6
tidying up
PhillipsOwen Nov 27, 2024
9bf59ee
adding some reformatting, validations
PhillipsOwen Jan 3, 2025
69edeca
adding some reformatting, validations
PhillipsOwen Jan 3, 2025
f85b342
updating to remove vulnerabilities
PhillipsOwen Jan 3, 2025
4a2824f
no longer used
PhillipsOwen Jan 3, 2025
f2153ad
refactoring for clarity, making the page a form
PhillipsOwen Jan 3, 2025
c2a4a04
adding some reformatting, adding validations
PhillipsOwen Jan 3, 2025
6dc0841
Merge branch 'main' of https://github.com/RENCI/APSViz-UI-V3 into use…
PhillipsOwen Jan 21, 2025
d37d27c
Merge branch 'main' of https://github.com/RENCI/APSViz-UI-V3 into use…
PhillipsOwen Jan 21, 2025
b56bac0
removing the state branch from the json metadata
PhillipsOwen Jan 23, 2025
010eaed
adjusting UI to handle a lot more external layers in the tray
PhillipsOwen Jan 24, 2025
46edf7d
adding guest login
PhillipsOwen Jan 24, 2025
4da4741
Merge branch 'issue-336-external-layers' of https://github.com/RENCI/…
PhillipsOwen Jan 27, 2025
2d02b46
incorporating latest external layers with user auth code
PhillipsOwen Jan 27, 2025
47c4acd
increasing cookie ttl
PhillipsOwen Jan 27, 2025
b9a169a
fixing the warning for the random number generator used for crypto
PhillipsOwen Jan 27, 2025
ce7a6b7
fixing the warning for the random number generator used for crypto
PhillipsOwen Jan 27, 2025
7ceaa2e
tidying up the additional layer legends.
PhillipsOwen Jan 28, 2025
5d782d9
Merge branch 'user-authenticate' of https://github.com/RENCI/APSViz-U…
PhillipsOwen Jan 29, 2025
2d053e0
fixing compiler warnings
PhillipsOwen Jan 29, 2025
e6d95ab
updates to get app settings from the DB
PhillipsOwen Jan 31, 2025
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
81 changes: 71 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,21 @@
"@turf/flatten": "^7.1.0",
"axios": "^1.7.7",
"axios-retry": "^4.5.0",
"bcryptjs": "^2.4.3",
"core-js": "^3.38.1",
"cssify": "^0.8.0",
"d3": "^7.9.0",
"dayjs": "^1.11.13",
"dotenv": "^16.4.5",
"geostyler-sld-parser": "^6.1.2",
"html-to-image": "^1.11.11",
"isaac": "^0.0.5",
"leaflet": "^1.9.4",
"mapbox-gl": "^3.7.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
"react-cookie": "^7.2.2",
"react-dom": "^18.3.1",
"react-draggable": "^4.4.6",
"react-leaflet": "^4.2.1",
Expand All @@ -88,6 +91,9 @@
"stream": "^0.0.3",
"ws": "^8.18.0"
},
"browser": {
"crypto": false
},
"overrides": {
"json5": "^2.2.2",
"lodash": "^4.17.11",
Expand Down
20 changes: 12 additions & 8 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React, { Fragment } from 'react';
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { Map } from '@components/map';
import { ObservationDialog } from "@components/dialog/observation-dialog";
import { ObservationDialog } from "@dialog/observation-dialog";
import { useLayers } from '@context';
import { Sidebar } from '@components/sidebar';
import { ControlPanel } from '@components/control-panel';
import { ComparePanel } from '@components/compare-panel';
import { MapLegend } from '@components/legend';
import { MapLegend, AdditionalMapLegend } from '@components/legend';
import { AlertUser } from '@components/alert-user';
import { Config } from '@components/config';
import { Acknowledgements } from "@components/acknowledgements";
import { Login, AddUser, AuthProvider, ProtectedRoute } from '@auth';

/**
* renders the main content
Expand Down Expand Up @@ -43,6 +44,7 @@ const Content = () => {
{ (defaultInstanceName != null) && <ControlPanel/> }
<ComparePanel/>
<MapLegend />
<AdditionalMapLegend />
<Acknowledgements />
</Fragment>
);
Expand All @@ -57,12 +59,14 @@ const Content = () => {
export const App = () => {
// render the application
return (
<Fragment>
<BrowserRouter>
<BrowserRouter>
<AuthProvider>
<Routes>
<Route path="/" element={ <Content/> } />
</Routes>
</BrowserRouter>
</Fragment>
<Route path="/" element={<ProtectedRoute><Content /></ProtectedRoute>}/>
<Route path="/login" element={<Login />} />
<Route path="/add-user" element={<AddUser />} />
</Routes>
</AuthProvider>
</BrowserRouter>
);
};
Loading