Commit graph

17 commits

Author SHA1 Message Date
Daniel Krol
aa691dbc09 Use verify_token=null as verified to avoid unique constraint
We were using verify_token="" to mean that the user was verified. We need a unique constraint on verify_token to prevent two users from getting the same verify link in their email. This means that if we have two verified users, they will both have verify_token="", which triggers the unique constraint. Oops. However, null is an exception to unique constraints, so we're now using that instead to mean verified.
2022-08-13 22:15:19 -04:00
Daniel Krol
e2893c13e3 Add test to confirm that we can create two accounts on the server. 2022-08-13 19:37:54 -04:00
Daniel Krol
f60e5659b6 Don't update verify tokens if the account is already verified 2022-07-31 14:13:30 -04:00
Daniel Krol
aa1361a5fa Human-friendly output for verify account endpoint 2022-07-31 12:59:46 -04:00
Daniel Krol
ea3b04eff6 store.VerifyToken 2022-07-31 12:42:03 -04:00
Daniel Krol
2dd3019b08 store.UpdateVerifyTokenString 2022-07-31 12:26:03 -04:00
Daniel Krol
eabfa9d54c No password change for unverified accounts 2022-07-30 23:09:33 -04:00
Daniel Krol
4a205bbda7 GetUserId - Return error if account unverified 2022-07-30 15:06:27 -04:00
Daniel Krol
dee2882fe9 Verify token db fields, CreateAccount changes 2022-07-30 14:24:33 -04:00
Daniel Krol
aefda1245b Make emails case insensitive (for now).
Prevents duplicate accounts. Also allows case insensitive search (user id, salt seed, etc) while still having an index. This is done by storing normalized as a separate field from originally formated (which we'll use for sending emails, etc).
2022-07-22 16:29:03 -04:00
Daniel Krol
f10cc8aa26 Salt Seed, used to generate secrets on client 2022-07-21 19:10:16 -04:00
Daniel Krol
4430013bae KDF for server password. Save salt in DB. 2022-07-14 22:04:03 -04:00
Daniel Krol
55686cb7b5 Change module name to new repo account 2022-07-11 22:14:53 -04:00
Daniel Krol
37fae6436b Create and test password change method
Includes updating the wallet if the user has one
2022-07-04 11:41:08 -04:00
Daniel Krol
a37b64faad Actually put in foreign key constraints! Also test wallet and account empty db fields. 2022-06-29 00:06:43 -04:00
Daniel Krol
0a74c67db0 Don't rely on store functions to verify other store functions in tests 2022-06-27 15:59:56 -04:00
Daniel Krol
535799299e Rename test file 2022-06-27 11:39:44 -04:00
Renamed from store/auth_test.go (Browse further)