Commit Graph

103 Commits

Author SHA1 Message Date
Derrick Hammer adc5bc213e
Revert "fix: add error for email verification"
This reverts commit ea5a97c6
2024-03-26 20:24:55 -04:00
Derrick Hammer 5a9f4a5940
fix: don't pass db error 2024-03-26 20:21:34 -04:00
Derrick Hammer ea5a97c613
fix: add error for email verification 2024-03-26 20:19:38 -04:00
Derrick Hammer 64eea68a84
fix: if user is already verified, abort 2024-03-26 20:17:41 -04:00
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 6d12ef9b94
Revert "fix: send, echo, and remove a copy of the cookie without the domain to try and work better with localhost"
This reverts commit ad23104700.
2024-03-26 11:23:20 -04:00
Derrick Hammer ad23104700
fix: send, echo, and remove a copy of the cookie without the domain to try and work better with localhost 2024-03-26 11:04:15 -04:00
Derrick Hammer 3e3f539a8b
refactor: change cookie approach to broadcast cookies across all protocols based on the root domain, so they can be shared. 2024-03-21 14:54:17 -04:00
Derrick Hammer ee8fa2b98d
refactor: dont pass a domain 2024-03-20 17:13:31 -04:00
Derrick Hammer ad8de8f5a1
refactor: switch to using MaxAge 2024-03-20 17:13:13 -04:00
Derrick Hammer 9587ef4941
refactor: require an api name to be provided and skip if not matched 2024-03-20 17:12:31 -04:00
Derrick Hammer 4a3028f61a
fix: cookies sent to us don't include the expiry time, so we need to parse from thr jwt echo it. 2024-03-20 14:56:18 -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 b55c1f7d48
refactor: set MaxAge 2024-03-19 11:43:11 -04:00
Derrick Hammer ce93591ff8
Revert "refactor: change ClearAuthCookie to set value to deleted"
This reverts commit ac61279081.
2024-03-19 11:40:34 -04:00
Derrick Hammer 6ac37cfe65
refactor: add no cache headers 2024-03-19 11:05:51 -04:00
Derrick Hammer ac61279081
refactor: change ClearAuthCookie to set value to deleted 2024-03-19 10:59:38 -04:00
Derrick Hammer d1bbe7c158
refactor: change ClearAuthCookie to set expires date to epoch 2024-03-19 10:57:49 -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 4391e9fc31
fix: define new cookie in EchoAuthCookie but use the existing cookies values 2024-03-19 05:02:48 -04:00
Derrick Hammer 66f73d1a53
feat: add EchoAuthCookie 2024-03-18 17:02:16 -04:00
Derrick Hammer 48dc1b9be0
Revert "fix: remove Secure property"
This reverts commit 9e5d996f20.
2024-03-18 16:54:42 -04:00
Derrick Hammer 9e5d996f20
fix: remove Secure property 2024-03-18 16:40:29 -04:00
Derrick Hammer 649e0e0011
Revert "fix: remove Secure property"
This reverts commit 044604d863.
2024-03-18 16:40:18 -04:00
Derrick Hammer 044604d863
fix: remove Secure property 2024-03-18 16:31:42 -04:00
Derrick Hammer e73ab26ebf
feat: add logout endpoint 2024-03-17 09:27:57 -04:00
Derrick Hammer 0e18f695cf
fix: name needs to be AuthTokenName, actually use jwt 2024-03-17 09:22:47 -04:00
Derrick Hammer d893216831
fix: SetAuthCookie needs the jwt 2024-03-17 09:18:01 -04:00
Derrick Hammer 675a583422
refactor: update SetAuthCookie to use routeableApi.AuthTokenName() 2024-03-17 09:15:47 -04:00
Derrick Hammer 244aa89d71
refactor: use jape.Context 2024-03-17 09:09:29 -04:00
Derrick Hammer 2a8c036dc6
refactor: set auth cookie for every api, and optionally pass a specific api name to only set instead 2024-03-17 08:59:34 -04:00
Derrick Hammer 5223a44790
refactor: move DEFAULT_AUTH_COOKIE_NAME to account 2024-03-17 08:51:59 -04:00
Derrick Hammer 51c7211c39
feat: add SetAuthCookie helper 2024-03-17 08:15:27 -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 d5118beb58
refactor: allow purpose to be none 2024-03-13 18:44:09 -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