Commit Graph

65 Commits

Author SHA1 Message Date
Derrick Hammer 4c2baf164f
fix: bad verify url, remove email query var 2024-03-26 16:49:53 -04:00
Derrick Hammer cf83dc6767
refactor: switch to a verification link 2024-03-26 15:12:31 -04:00
Derrick Hammer 98c576e2e8
refactor: update SendEmailVerification to take a user id and look it up 2024-03-26 15:00:29 -04:00
Derrick Hammer b6c92a6348
fix: check for a mysql.MySQLError and error no 1062 explicitly 2024-03-20 13:39:13 -04:00
Derrick Hammer aff371a844
feat: add update password api route 2024-03-19 10:04:27 -04:00
Derrick Hammer 3473551f6c
fix: ensure exists check only matches if it is a different account id 2024-03-19 09:48:45 -04:00
Derrick Hammer 080bef354d
refactor: check if the email is the same and return a new error for it 2024-03-19 09:44:44 -04:00
Derrick Hammer 9ea77fb5c3
fix: check to ensure error is something other than ErrRecordNotFound, or that exists is true 2024-03-19 09:29:29 -04:00
Derrick Hammer 9e52d35d2f
Revert "fix: use AccountExists"
This reverts commit 0bbb89e02c.
2024-03-19 09:26:36 -04:00
Derrick Hammer 0bbb89e02c
fix: use AccountExists 2024-03-19 09:24:19 -04:00
Derrick Hammer 9bfdef1519
feat: add UpdateAccountEmail 2024-03-19 07:46:58 -04:00
Derrick Hammer ba0d32bb63
fix: update how ExpireTime is computed 2024-03-15 07:27:24 -04:00
Derrick Hammer d946e969bc
fix: update to check for ErrDuplicatedKey and return a more specific but generic error if so 2024-03-13 18:53:45 -04:00
Derrick Hammer 2f0a538033
fix: return user 2024-03-13 14:09:17 -04:00
Derrick Hammer 53f9a8fb32
refactor: add UploadPinned and have DNSLinkExists ensure the upload exists, the dnslink exists, and the upload is pinned 2024-03-03 06:16:01 -05:00
Derrick Hammer 25b4286011
feat: add password reset apis 2024-02-26 10:55:26 -05:00
Derrick Hammer 92c33e0af5
refactor: delete all the users email verifications after a successful verification 2024-02-26 10:39:09 -05:00
Derrick Hammer 036520581f
refactor: handle both user verification, and changing email 2024-02-26 10:35:57 -05:00
Derrick Hammer 5c6224222f
fix: only update user if we aren't yet verified 2024-02-26 10:30:22 -05:00
Derrick Hammer 355033634d
refactor: set login ip with LoginPubkey 2024-02-26 08:28:22 -05:00
Derrick Hammer 2573936000
refactor: add bypassSecurity to doLogin 2024-02-26 08:26:59 -05:00
Derrick Hammer 90834601d7
refactor: modify CreateAccount to optionally send an email verification 2024-02-26 08:15:10 -05:00
Derrick Hammer 8965395fdf
feat: add apis for sending email verification, and verifying an email code 2024-02-26 08:14:30 -05:00
Derrick Hammer 3a0c7bdea2
refactor: always preload all relations with exists 2024-02-25 09:48:26 -05:00
Derrick Hammer 38375d44d8
feat: initial DNS link support 2024-02-25 09:47:40 -05:00
Derrick Hammer 7f5741a64b
fix: update config management in account pkg 2024-02-22 03:41:28 -05:00
Derrick Hammer ca289818a9
refactor: use errors.Is 2024-02-18 03:24:06 -05:00
Derrick Hammer a77981f0a6
fix: PinByHash does not query right 2024-02-18 03:21:52 -05:00
Derrick Hammer fc042570ab
refactor: change to store the hash as a raw, but also make it unique with an index 2024-02-17 23:17:26 -05:00
Derrick Hammer 0cb1f96813
fix: bug fix exists 2024-02-17 20:19:00 -05:00
Derrick Hammer ca559eccc5
chore: remove AccountErrorNil 2024-02-17 09:02:17 -05:00
Derrick Hammer bbf8ec79d3
refactor: change info to be the model struct 2024-02-17 09:02:04 -05:00
Derrick Hammer a546089378
refactor: account api needs to use the error interface 2024-02-17 08:14:58 -05:00
Derrick Hammer 1812b9cd38
refactor: change PinByHash to take hash in byte form 2024-02-16 21:57:20 -05:00
Derrick Hammer 16e8c84daa
refactor: OTPDisable needs to return *AccountError 2024-02-15 21:00:08 -05:00
Derrick Hammer 24d491ec4e
refactor: UpdateAccountName needs to return *AccountError 2024-02-15 20:56:48 -05:00
Derrick Hammer 829852c6c1
refactor: use new error struct and error messages 2024-02-14 00:24:22 -05:00
Derrick Hammer 143a563a51
refactor: param consistency changes 2024-02-13 23:31:08 -05:00
Derrick Hammer 634a285ea8
refactor: use uint and param consistency changes 2024-02-13 23:29:36 -05:00
Derrick Hammer 96758a5559
feat: add opt support to account, refactor validation api 2024-02-13 23:23:45 -05:00
Derrick Hammer 93e7563bed
refactor: don't use pointer receiver 2024-02-13 22:38:13 -05:00
Derrick Hammer f645499c7f
refactor: prefix all jwt helpers 2024-02-13 22:31:44 -05:00
Derrick Hammer 9f6f2c9c87
feat: add purpose to jwt with consts 2024-02-13 20:58:17 -05:00
Derrick Hammer 8423578bdd
refactor: more re-organizing 2024-02-13 20:00:16 -05:00
Derrick Hammer f5bb0fa45f
chore: remove un-used function 2024-02-13 19:58:24 -05:00
Derrick Hammer 9b748e1f57
refactor: de-duplicate login logic and re-organize code 2024-02-13 19:57:41 -05:00
Derrick Hammer 40b830d669
refactor: update account login and ip address in LoginPassword 2024-02-13 19:52:18 -05:00
Derrick Hammer 23113d0f9c
refactor: create updateAccountInfo 2024-02-13 19:49:08 -05:00
Derrick Hammer 302821d749
refactor: more refactoring of methods and move some validation to gorm 2024-02-13 19:36:23 -05:00
Derrick Hammer 99c440ab88
refactor: unify account exists methods 2024-02-13 19:28:04 -05:00