Scribbie-Notes / notes-app

20 stars 47 forks source link

[BUG] Backend error while logging in and Signing up #119

Open yashmandi opened 5 days ago

yashmandi commented 5 days ago

steps to reproduce error: try to signup or login, and open console, you'll get the error description in inspect section.

*important: after fixing the issue, kindly attach the screenrecording of the solution

image

image

Abhishek332 commented 5 days ago

@yashmandi Could I get assign on this issue?, I would love to contribute.

zaheer-Khan3260 commented 4 days ago

As a Mern Stack developer i have great knowledge in authentcation so please assign too me i love to work on this bug.

ishanguptaofficial commented 4 days ago

Hello Scribbie-Notes Team,

My name is Ishan, and I am a 4th-year BTech student with experience in full-stack development. I would love to contribute to your project. Here is my LinkedIn profile: https://www.linkedin.com/in/ishanguptaofficial/.

Could you please assign me to this issue? Looking forward to your response.

Best regards, Ishan

yashmandi commented 4 days ago

you can work on it @Abhishek332

Abhishek332 commented 4 days ago

Thankyou

zaheer-Khan3260 commented 4 days ago

Hey, @Abhishek332 If you need any help to solve this problem then Message we can work on it together.

RaiDevX8 commented 3 days ago

is this issue solved? @yashmandi since i could not able to login i not able to implement my issue

Abhishek332 commented 3 days ago

Hi Guys, wait for some time, I found the cause, I will be push the fix for it today EOD. Thanks

RaiDevX8 commented 3 days ago

nice work @Abhishek332 !!

Hi Guys, wait for some time, I found the cause, I will be push the fix for it today EOD. Thanks

Saurabhchaudhary9799 commented 2 days ago

hey @yashmandi , can i work on this issue , because of this issue , i can't work on other issues

yashmandi commented 2 days ago

hey @yashmandi , can i work on this issue , because of this issue , i can't work on other issues

@Abhishek332 is alreay working on this one.

yashmandi commented 2 days ago

by when can you get it done @Abhishek332 ?

Abhishek332 commented 2 days ago

Hi @yashmandi,

I've fixed the issue and am currently doing some testing. While testing, I found a few more bugs and improvements that we can address in the codebase:

  1. We're currently tracking a lot of node_modules packages, which shouldn't be tracked. I've already submitted a PR to fix this. Could you please assign this issue to me under the hacktoberfest label and review/merge the PR? This will help new contributors avoid confusion about why they see many file changes, even though /frontend/node_modules is listed in .gitignore.

Issue Link: #137 PR Link: https://github.com/Scribbie-Notes/notes-app/pull/138

  1. I'm getting a 400 (bad request) error during login

  2. After successful signup, all subsequent API requests return a 403 error (seems like the auth token isn’t being passed for some reason – needs troubleshooting).

I haven’t created separate issues for points 2 and 3 yet. I'll verify these further and then create the necessary issues if needed.

Lastly, I’ve set up a Brevo account and created the SMTP API key for sending emails, but I'm unsure what to add for BREVO_USER in backend/.env. Could you please share the correct value so I can fully test the signup flow for points 2 and 3?

Thanks!

Abhishek332 commented 2 days ago

by when can you get it done @Abhishek332 ?

@yashmandi ,

Should we close this issue (as fix for it already present in main) and track issue that I mention in previous comment in separate ticket?

https://github.com/user-attachments/assets/ba7d7ab3-0e2c-4474-93be-09a030d5b6fd

RaiDevX8 commented 2 days ago

So now you are on the main page but you cannot create notes it redirects to the login page right @Abhishek332

RaiDevX8 commented 2 days ago

Am pretty sure login won't work here you done registration only

Abhishek332 commented 2 days ago

Am pretty sure login won't work here you done registration only

Yes, I mentioned the login issue in my second point. There seems to be another problem with the login, which results in a 400 (Bad Request) error. Adding issue link below, could you please assign this issue to me @yashmandi https://github.com/Scribbie-Notes/notes-app/issues/141

Additionally, after registration, all API calls are failing (as noted in my third point). I suspect it might be related to the sendMail process not being completed or verified. I haven't created a ticket for this yet, as it might just be an issue on my end.

Abhishek332 commented 2 days ago

@RaiDevX8 Could you help me setup Brevo for sending email. I create a account in Brevo. Create SMTP secret key But stuck in what value do I need to add in BREVO_USER in backend/.env

tanish35 commented 1 day ago

Hi @Abhishek332 Go to SMTP&API Page there you would see a field called login and a email ends with @smtp-brevo.com. Tho i would say not to use brevo as you also have to set up your custom domain to make it work

https://www.youtube.com/watch?v=kTcmbZqNiGw

Please do watch this video to set up a server directly using gmail. It will be easier also verified and your emails won't go to spam. No need to change the code the details will be the same

Abhishek332 commented 1 day ago

Hi @yashmandi,

I've fixed the issue and am currently doing some testing. While testing, I found a few more bugs and improvements that we can address in the codebase:

  1. We're currently tracking a lot of node_modules packages, which shouldn't be tracked. I've already submitted a PR to fix this. Could you please assign this issue to me under the hacktoberfest label and review/merge the PR? This will help new contributors avoid confusion about why they see many file changes, even though /frontend/node_modules is listed in .gitignore.

Issue Link: #137 PR Link: #138

  1. I'm getting a 400 (bad request) error during login
  2. After successful signup, all subsequent API requests return a 403 error (seems like the auth token isn’t being passed for some reason – needs troubleshooting).

I haven’t created separate issues for points 2 and 3 yet. I'll verify these further and then create the necessary issues if needed.

Lastly, I’ve set up a Brevo account and created the SMTP API key for sending emails, but I'm unsure what to add for BREVO_USER in backend/.env. Could you please share the correct value so I can fully test the signup flow for points 2 and 3?

Thanks!

@yashmandi @RaiDevX8 Login issue is fixed, please review and merge it https://github.com/Scribbie-Notes/notes-app/pull/148

https://github.com/user-attachments/assets/3351b9de-0936-4be3-8aea-a3493feebb66

Abhishek332 commented 1 day ago

Hi @yashmandi,

I've fixed the issue and am currently doing some testing. While testing, I found a few more bugs and improvements that we can address in the codebase:

  1. We're currently tracking a lot of node_modules packages, which shouldn't be tracked. I've already submitted a PR to fix this. Could you please assign this issue to me under the hacktoberfest label and review/merge the PR? This will help new contributors avoid confusion about why they see many file changes, even though /frontend/node_modules is listed in .gitignore.

Issue Link: #137 PR Link: #138

  1. I'm getting a 400 (bad request) error during login
  2. After successful signup, all subsequent API requests return a 403 error (seems like the auth token isn’t being passed for some reason – needs troubleshooting).

I haven’t created separate issues for points 2 and 3 yet. I'll verify these further and then create the necessary issues if needed.

Lastly, I’ve set up a Brevo account and created the SMTP API key for sending emails, but I'm unsure what to add for BREVO_USER in backend/.env. Could you please share the correct value so I can fully test the signup flow for points 2 and 3?

Thanks!

@yashmandi 3rd one is also fixed. Could you please assign this issue to me under hacktoberfest and review and merge it issue link - https://github.com/Scribbie-Notes/notes-app/issues/149 Pr Link: https://github.com/Scribbie-Notes/notes-app/pull/150

Abhishek332 commented 1 day ago

Hi @Abhishek332 Go to SMTP&API Page there you would see a field called login and a email ends with @smtp-brevo.com. Tho i would say not to use brevo as you also have to set up your custom domain to make it work

https://www.youtube.com/watch?v=kTcmbZqNiGw

Please do watch this video to set up a server directly using gmail. It will be easier also verified and your emails won't go to spam. No need to change the code the details will be the same

Sure, @tanish35 I will definately check it out. Thankyou

RaiDevX8 commented 1 day ago

Nice job @Abhishek332