interledger / testnet

An open-source test application that aims to utilize Rafiki's functionalities and demonstrate its advantages in real-world scenarios.

Home Page:https://rafiki.money

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement the Change password feature

Tymmmy opened this issue · comments

We started a change password feature, and that can be finished now.
Check ChangePasswordForm for the initial idea.
Update the component according to new Testnet standards.

On the Settings page add a Change password button.
Onclick the Form for change password appears with a new Save password button.
Make the necesarry validations for password checks (already present when registering for an account).
On Save password click, the new password is saved into the database.

Hey, Im interested in resolving this issue

@Cioraz assigned the issue to you

@Cioraz any updates on this?

Issue is still open if anyone interested for #hacktober

Here I am.

@Tymmmy I am trying to solve it, but I can't test it, and I am having problems to find the controller and the error on this.

Now, I found the error, and The error Logger, so it seems that the backend is offline or unreachable.

I am guessing you have the code locally, make sure the docker is running, wallet-backend is running in docker, if you have errors, then the docker logs are the ones that will help us solve the problem. So attach the docker logs from wallet-backend

I am guessing you have the code locally, make sure the docker is running, wallet-backend is running in docker, if you have errors, then the docker logs are the ones that will help us solve the problem. So attach the docker logs from wallet-backend

There isn't docker errors. The only error a See is Timeout from the request, that for me it means that the URL passed to the http client is offline. But I will try it again now, and see if there is some docker error.

image

The Docker logs

That seems like terminal logs, not docker logs. By docker logs I mean, you go to the Docker, and in the Containers wallet-backend check the logs. It should be something like this:

image

Alright, I don't use Docker desktop, only the Docker Engine. How can I see it that well ?

image

The Error. @Tymmmy

It is supposed to appear here some log for wallet backend ?

image

You don't have a Sendgrid account that sends email I guess, that's why in env variables the SEND_EMAIL should be set to false. The API key for Sendgrid I can't share, because that is charged. So you will not be able to send password. But the story refers to change password, and not the forgot password. So theoretically you don't need to send out emails. The change password should be in the Settings menu, and update the password in the DB in postgres.

Logs for wallet-backedn appear in the Logs of the Docker, even if you use only the Docker Engine you should be able to see the logs, I think docker logs wallet-backend command in terminal? I am not sure though...

You don't have a Sendgrid account that sends email I guess, that's why in env variables the SEND_EMAIL should be set to false. The API key for Sendgrid I can't share, because that is charged. So you will not be able to send password. But the story refers to change password, and not the forgot password. So theoretically you don't need to send out emails. The change password should be in the Settings menu, and update the password in the DB in postgres.

Yes, I got it now. But, how can I test the change of a password, without have a token to verify and then change it ? I gues the token will be printed at the deps.logger is it right ?

Logs for wallet-backedn appear in the Logs of the Docker, even if you use only the Docker Engine you should be able to see the logs, I think docker logs wallet-backend command in terminal? I am not sure though...

So, something went wrong here, I don't see the waller backend logs.

So, the user is logged in, so auth has been done already, then the user goes to Settings page, where the form for change password appears if the user clicks on the button. The form requires old password and new password to be set. Then in the backend, because the user is already logged in and you just want to update the old password with the new password for the user that is logged in, you don't need token. Just simple update of password.

So, the user is logged in, so auth has been done already, then the user goes to Settings page, where the form for change password appears if the user clicks on the button. The form requires old password and new password to be set. Then in the backend, because the user is already logged in and you just want to update the old password with the new password for the user that is logged in, you don't need token. Just simple update of password.

Alright, now, I got it perfectly. Let's work in.

@Tymmmy How can I simmulate the Login ? With wich credencials or how can I log in to enter the settings page and see the form ?

you can register with an account with fake email. in .env variables set SEND_EMAIL to false. Go to registration, the KYC is already completed you just have to add a name and click next next. Then when it sais an email has been sent for verification, you go to the docker logs and the link for verification will be there. Now here is the problem if you don't see docker logs :( I suggest trying to fix that problem first. Because after that you can login and see Settings page. But you need that link for verification from wallet-backend docker logs.

I will try it.

image

The error is under boundaries. 😆

Do you have the RAPYD keys set up in env variables? Can you send me an example of your env file?

Yes I Can, and a have set the RAPYD Keys, all three.

RAPYD_ACCESS_KEY=
RAPYD_SECRET_KEY=
RAPYD_SETTLEMENT_EWALLET=
SEND_EMAIL=
FROM_EMAIL=
SENDGRID_API_KEY=
AUTH_IDENTITY_SERVER_SECRET=
RATE_API_KEY=

# commerce env variables
# encoded base 64 private key
PRIVATE_KEY=
KEY_ID=
PAYMENT_POINTER=
´´´

the values are empty I see. You need to add values for the first 3 from RAPYD (see README as to how you can do that), then SEND_EMAIL=false. The rest can be empty I think for what you currently need.

It was the example file. On the real env file I use the Rapyd Values. I'll show you.

Please show me your .env file, and make sure you don't try to create a new user with same email as you did before (RAPYD does not allow that, use fake email)

RAPYD_ACCESS_KEY="rak_EB5F11FE1AB7CDDE677B"
RAPYD_SECRET_KEY="rsk_0fc68b618eab476282c95e4d1cdc17de9a569dbe044607994a8f2ef8164e2be36cd4b4eeca285086"
RAPYD_SETTLEMENT_EWALLET="ewallet_4684051e42a7cc798e53a93927de62a8"
SEND_EMAIL=false
FROM_EMAIL=false
SENDGRID_API_KEY=false
AUTH_IDENTITY_SERVER_SECRET=""
RATE_API_KEY=""

# commerce env variables
# encoded base 64 private key
PRIVATE_KEY=""
KEY_ID=""
PAYMENT_POINTER=""

I want to contribute here.

I am working on. @NirmitSeta

@Tymmmy Hey, I Can't keep working on this. I am so busy with school and other stuffs. Can you assign it to another person please ?