Comments (3)
This is great, and we do need that data on the FE as most features hinge on it. I believe role
is still being stored on the Postgres database, however.
My understanding is that username, email, name, and role are being stored on the WEB BE and everything else gets stored on DS.
Also, we have an endpoint on the BE (profileRouter.js
, line 19) that is supposed to do this - a good focus might be to review why this endpoint isn't working, as it's the one our FE is trying to use to pull that info.
One big issue could be that we don't have Auth0 fully fleshed out on BE, and we still have outdated user_id
s for our test users. This endpoint needs a proper user ID in order to pull that user's data, so we also need to ensure that the FE is pulling the Auth0 user's ID and sending it with the request.
Anything else to be added here, @ryan-hamblin, or anything I put down here not on the right track?
from underdog-devs-fe-a.
thanks for the technical context here @paulstgermain :chefs_kiss:
One big issue could be that we don't have Auth0 fully fleshed out on BE, and we still have outdated user_ids for our test users. This endpoint needs a proper user ID in order to pull that user's data, so we also need to ensure that the FE is pulling the Auth0 user's ID and sending it with the request.
Let's add a task to the Backlog to deliver a new, modern, data schema for the BE. This would focus primarily on diagraming the new required schema for our web backend. Take into consideration the DS Database. The deliverable here will help us when crafting the work for the upcoming data seeds/migrations between web/ds as we've been discussing with @BrokenShell in our team meetings.
from underdog-devs-fe-a.
@ryan-hamblin We are currently need of setting global state with current user profile information upon login. This information will be needed for many of the components throughout the application. We likely need to created a BE endpoint that responds with the current users profile_id(from DS) and role upon receiving a request with the user_id(from Auth0) in the body.
Sweet Inside of profileRouter.js
there is an endpoint called GET '/current_user_profile
let's work from this. I'd suggest moving it to kebab-case
away from snake_case
as a minor semantic.
Work with @mina-mikhael as they've been putting together the authRequired
middlware.
The authRequired
middleware should be setting a profile_id
onto the req.body.profile
object so that you can use that for your lookup on the user profile information. You may not need to even peek into the DB for this info as it could be put into state on that req.body.profile
object.
@ryan-hamblin approves this work.
Recommended story points: 5
from underdog-devs-fe-a.
Related Issues (20)
- Bug/Form-Position-Updates
- Navbar could stay fixed when scrolling
- Problematic merge - issues with Auth0 integration
- Redux cleanup HOT 2
- Login logic flow HOT 1
- FE: Graph DS Endpoint Update
- FE: Login redirects as users navigate pages
- FE: REACT ROUTER WARNING on createHistory
- FE: Navbar login/apply/logout buttons
- A possible update is needed in the Environment Variables in notion HOT 1
- BL-997 non-auth landing page breaking feature HOT 1
- update needed for both FE and BE .env files
- home page Login button still show after the user is logged in
- 'Tickets Dashboard' page not rendering data
- Bug: Applications unable to be successfully submitted (FE)
- Bug: Persistent error rendering on application forms
- As an Admin, I can see Mentees and pair them with a mentor
- Create new Tenant for UnderDog Devs Auth0 Login
- Fixing BE to take in data from the DS Api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from underdog-devs-fe-a.