Code Monkey home page Code Monkey logo

Comments (3)

paulstgermain avatar paulstgermain commented on August 30, 2024

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_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.

Anything else to be added here, @ryan-hamblin, or anything I put down here not on the right track?

from underdog-devs-fe-a.

ryan-hamblin avatar ryan-hamblin commented on August 30, 2024

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 avatar ryan-hamblin commented on August 30, 2024

@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.
image

@ryan-hamblin approves this work.

Recommended story points: 5

from underdog-devs-fe-a.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.