ferdium / ferdium-app

All your services in one place, built by the community
https://ferdium.org
Apache License 2.0
2.92k stars 176 forks source link

Bug: Reset password (and maybe login too) doesn't work #312

Closed Mihaitron closed 1 year ago

Mihaitron commented 2 years ago

Avoid duplicates

Ferdium Version

6.0.0-nightly.69

What Operating System are you using?

Windows

Operating System Version

Windows 10 Home, Version 10.0.19044, Build 19044

What arch are you using?

x64

Last Known Working Ferdium version

No response

Expected Behavior

For login: make an account on a device, log in perfectly, switch to another device, log in perfectly For reset password: submit the reset email address in the reset password page, be sent and link and continue on the password reset flow

Actual Behavior

For login: make an account on a device, log in perfectly, switch to another device, 401 invalid credentials in the console For reset password: make an account, go to reset password, 404 route not found in console

Steps to reproduce

For login:

  1. Install on a device
  2. Make an account (and login if not auto-login)
  3. Install on another device
  4. Type email and password
  5. Click on sign in -> nothing happens

For reset password:

  1. Install on a device
  2. Make an account (and log out if necessary)
  3. Go to reset password screen
  4. Type email
  5. Click on submit -> nothing happens

Debug link

No response

Screenshots

For login: image

For reset password: image image

Additional information

No response

SpecialAro commented 2 years ago

Hello @Mihaitron !

Some users raised this issue previously. Can you please check if you're inputing the correct e-mail address (it is CASE SENSITIVE - the case you entered on singin should be the one you use to login) and password?

Mihaitron commented 2 years ago

Yup, I'm inputting the correct email address (as well as the correct password). I'm using a password manager and I just checked the email address on the instance on the other device where I'm logged in and it is the correct one.

SpecialAro commented 2 years ago

Yup, I'm inputting the correct email address (as well as the correct password). I'm using a password manager and I just checked the email address on the instance on the other device where I'm logged in and it is the correct one.

You never got the chance to reset the password, correct? Would you mind to share the "first name" of your account, just to check if I can see any log of a sent email?

Mihaitron commented 2 years ago

According to the console and the status of the request no email was sent, so no, I didn't get the chance to reset it. First name is "Mihai"

SpecialAro commented 2 years ago

According to the console and the status of the request no email was sent, so no, I didn't get the chance to reset it. First name is "Mihai"

Great, if you don't mind, can you message me on discord (SpecialAro#1474) given that I'll need to confirm your e-mail with you, and might be sensible information for you?

SpecialAro commented 2 years ago

I've checked the ferdium-server repository and, in fact, there is an entry missing of auth/password on the routes.js file. Also, there is no function implemented on UserController.js (where I think the post request for this should be) for password reset.

I lack knowledge to fix this... maybe someone which is familiar with the code can help? @vraravam, sorry to bother you again, but can you take a look ?

SpecialAro commented 2 years ago

Just confirmed, this is not implemented on the routes.js file of ferdium-server. image

cino commented 2 years ago

@SpecialAro Do we want to remove the case sensitivity on the email part? Seems unlogical for me to be this way.

Mihaitron commented 2 years ago

@cino I don't think the case sensitivity is relevant for this issue. The issue seems to be, as @SpecialAro said, that the route for resetting the password is not implemented in the routes.js file. I believe implementing it, without changing the case sensitivity, would solve the issue.

SpecialAro commented 2 years ago

@SpecialAro Do we want to remove the case sensitivity on the email part? Seems unlogical for me to be this way.

Yes, too. But the problem relies on the server route not setted... If you can help with that would be incredible! 😁

cino commented 2 years ago

Ah I see, let me have a look. You can assign this issue to me tho.

Edit: Actually, this is gonna require some more depth knowledge of how the api/integration is set up at this stage. Looks like the whole reset password flow has not been built in the app and is available from the web interface at https://api.ferdium.org/user/login.

So the problem is not just on the API endpoints not being there, but also the user interface not being complete yet.

I suggest we could change the current "forgot password" button to open the web page available at given URL and create a feature request to re-think the flow without using the web interface.

SpecialAro commented 2 years ago

I suggest we could change the current "forgot password" button to open the web page available at given URL and create a feature request to re-think the flow without using the web interface.

I agree with this given that was what I thought we could do to solve it as a workaround. I will try to implement it now 😄