Git Product home page Git Product logo

Comments (10)

AbhiBajpaishek avatar AbhiBajpaishek commented on July 2, 2024

@lugenx What's the scope of this ticket? I'm assuming, its scope involves creating a login endpoint using JWT?

from ecohabit.

lugenx avatar lugenx commented on July 2, 2024

yes, exactly.

from ecohabit.

lugenx avatar lugenx commented on July 2, 2024

maybe we should brake down pieces if you think it's too much work for a single issue. but i don't know how.

from ecohabit.

AbhiBajpaishek avatar AbhiBajpaishek commented on July 2, 2024

maybe we should brake down pieces if you think it's too much work for a single issue. but i don't know how.

No, creating a login endpoint in a single ticket sounds fair, though we need to decide on couple of things.

  1. What fields do we want to return in jwt body.
  2. We haven't established a connection with Mongo DB as yet, so do we need to add a ticket for that first?
  3. Shall we create a registration endpoint first as that will put users' info in DB.

from ecohabit.

AbhiBajpaishek avatar AbhiBajpaishek commented on July 2, 2024

maybe we should brake down pieces if you think it's too much work for a single issue. but i don't know how.

No, creating a login endpoint in a single ticket sounds fair, though we need to decide on couple of things.

  1. What fields do we want to return in jwt body.
  2. We haven't established a connection with Mongo DB as yet, so do we need to add a ticket for that first?
  3. Shall we create a registration endpoint first as that will put users' info in DB.

Just saw changes are merged for #95. Updated Questions:

  • Shall we create a ticket to add OTP authentication for registration?
  • MongoDB URI?
  • Where would we store JWT Secret
  • What fields do we want to return in jwt body.

from ecohabit.

lugenx avatar lugenx commented on July 2, 2024
  1. i need to brainstorm on that
  2. we already established connection to MongoDB, its in the runServer function in the index file.
  3. i created an endpoint but it will be changed when we work on auth.

from ecohabit.

lugenx avatar lugenx commented on July 2, 2024

there is actually another open pr #101 , at a quick glance it looks like some user auth stuff is handled, but i need to clone and check closely to see how we are going to proceed with that pr.
yeah, MongoDB URI will be stored in env file and added to railway.app as an env variable. i think we can do the same thing to jwt secret as well?

from ecohabit.

AbhiBajpaishek avatar AbhiBajpaishek commented on July 2, 2024

there is actually another open pr #101 , at a quick glance it looks like some user auth stuff is handled, but i need to clone and check closely to see how we are going to proceed with that pr. yeah, MongoDB URI will be stored in env file and added to railway.app as an env variable. i think we can do the same thing to jwt secret as well?

Sounds good, though IDK how railway app works, so how will we get URI from railway app?

from ecohabit.

lugenx avatar lugenx commented on July 2, 2024

yeah, there is a section that holds environmental variables.
you basically copy paste whatever is in your env file and it takes variables from there with the same exact variable (for ex. process.env.MONGO_URI)

from ecohabit.

lugenx avatar lugenx commented on July 2, 2024

if anybody needs a uri for development purpuse, one can simply create a free db and put their own uri to the env file and use it.

from ecohabit.

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.