nazrinharris / pecunia

Massively ambitious personal finance app.
1 stars 0 forks source link

In `DebugLoginRegister` add a way to convert the a deprecated local account to a new one #165

Closed nazrinharris closed 3 months ago

nazrinharris commented 8 months ago

This doesn't need to be a full fledged feature, as this technically only applies to me.

nazrinharris commented 3 months ago

IIRC, the new account could either be:

  1. Using the new bcrypt hashing for password
  2. Using a new UserType
nazrinharris commented 3 months ago

I think I'll name the old PecuniaUser to be PecuniaUser V1, so that means the newer version would be PecuniaUser V2, which uses bcrypt for local password storage and introduces UserType.

If I'm correct, #154 introduced UserType and #146 introduced bcrypt.

nazrinharris commented 3 months ago

So here's how the updating will go.

  1. User chooses to update account
  2. App first settles the UserType shenanigan, that is, it searches the local database to see if the current logged in user is a local user or not, and sets it accordingly.
  3. Then, requests the user to reenter their password, so that a new hash can be made.
nazrinharris commented 3 months ago

Now that I've looked into it a little bit more, it seems like maybeMigratePecuniaUser is already handling the UserType shenanigan, all that's left is to handle the password

nazrinharris commented 3 months ago

Should be completed with 6926391 in #132