-
-
Notifications
You must be signed in to change notification settings - Fork 0
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: Add credential submission and tracking #79
Conversation
…nagement on frontend
# Conflicts: # client/src/App.tsx # client/src/components/Navbar.tsx # client/src/pages/Home.tsx # client/src/pages/Login.tsx # client/src/pages/Profile.tsx # client/src/types.ts
.catch((error) => console.warn('Could not fetch events: ', error)); | ||
.catch((error) => { | ||
if (error === '403: Forbidden') | ||
setError('Please enter AWS Credentials to view events'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
@@ -1,21 +1,18 @@ | |||
import React, { lazy, useState } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm the lazy loading didnt turn out to be a home run. I wonder how many other issues were stemming from it. Maybe there's a better use case for it in larger applications.
RETURNING *; | ||
`, | ||
[ | ||
res.locals.awsCredentials.aws_access_key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, Aidan. Idk how any of this would have happened without your brain.
Linked issue/ticket
#29
Description
Connects the credential entry fields on the profile page to the backend.
The database now tracks AWS credentials in the users table.
The frontend tracks user information including AWS credentials in localstorage
This allows session managment.
Routing also now works by restricting access to information that requires a login, or credentials set
Reproduction steps
You will need to run
npm run docker-remove-all
so that the users table can be rebuilt with the aws credential columnsStart up the app, and try to navigate to the homepage, events dashboard, or profile. You will be told you need to login first.
Since you deleted the database volume, you'll need to sign up as a new user, and then log in.
Try to access the events dashboard. You will be told you need to enter your AWS credentials.
Back on the profile page, enter your AWS credentials. After dismissing the popup, you can now view events on the dashboard and charts on the homepage.
If you close your browser and reopen, you should be able to click login, and it will automatically log you in with your stored user session data.
If you want to change your AWS credentials at any time, you can in the profile page.
Checklist