braydenidzenga / Dev-Dialogue

MIT License
3 stars 12 forks source link

Stop user from logging in if the user is banned. #2

Closed braydenidzenga closed 2 days ago

nidhi752 commented 2 days ago

hey, @braydenidzenga I am unable to start this on my local machine. Can you please help?

braydenidzenga commented 2 days ago

hey, @braydenidzenga I am unable to start this on my local machine. Can you please help?

@nidhi752 Have you followed all the steps in the setup documentation?

NagapavanTechWorm commented 2 days ago

Hi @braydenidzenga,

I'd love to contribute to this issue! I can help by implementing a check in the login process to prevent banned users from accessing the system. I’ll start by adding a validation step that checks the user’s status in the database before allowing login attempts.

Let me know if this approach works for you, and I can begin working on it!

braydenidzenga commented 2 days ago

Hi @braydenidzenga,

I'd love to contribute to this issue! I can help by implementing a check in the login process to prevent banned users from accessing the system. I’ll start by adding a validation step that checks the user’s status in the database before allowing login attempts.

Let me know if this approach works for you, and I can begin working on it!

@NagapavanTechWorm Sounds like a good approach to me. I will assign this issue to you, please create a pull request when you are done implementing this.

braydenidzenga commented 2 days ago

@NagapavanTechWorm the login function can be found in api/controllers/auth/Login.js

nidhi752 commented 2 days ago

@braydenidzenga hi yes, I have done almost everything. It's not working.

braydenidzenga commented 2 days ago

@braydenidzenga hi yes, I have done almost everything. It's not working.

Can you send a screen shot of the error

nidhi752 commented 2 days ago

image

braydenidzenga commented 2 days ago

image

Check that your mongodb connection string is right since it's an issue connecting to the database

nidhi752 commented 2 days ago

I have checked and confirmed it several times.

NagapavanTechWorm commented 2 days ago

@nidhi752 Inside the api folder, create a .env file and add the MongoDB URL. Use an example URL like this: mongodb+srv://<username>:<password>@100xdev.4iu3b.mongodb.net/. At the end, specify the collection as Dialogue or your wish, for example: mongodb+srv://<username>:<password>@100xdev.4iu3b.mongodb.net/Dialogue.

nidhi752 commented 2 days ago

image

now i can't see where this is working

PS: I have tried opening port 3000, it won't work image