6 Commits (isekai-main)

Author SHA1 Message Date
Barış Soner Uşaklı 04998908ba
Fixes for "validate email" & "send validation email" in ACP (#11677)
* confirmObj changes

dont expire confirm:<code>, add a expires field instead
dont expire confirm:byUid:<uid>

on admin manage users display the users email status
	1. verified
	2. verify email sent (pending)
	3. verify email sent (expired)
	4. no email entered

fix validate email in acp to use
	email in user:<uid> if they have one
	if not check if its in confirm:<code>
	if its not in above cant validate throw error

fix send validate email to use
	email in user:<uid> if they have one
	if not check if its in confirm:<code>
	if its not in above too cant validate throw error

* add back socket.io tests

* test: fix confirm tests

no longer using pexpire
return correct time left on token

* chore: update openapi

* fix: delete call

* test: mget test fixes

* test: fix tests
2 years ago
Julian Lam dbc84f7571 Merge branch 'master' into develop 2 years ago
Barış Soner Uşaklı 845c8013b6
fix: #11259, clean old emails when updating via admin (#11260)
when admin is changing users emails check if its avaiable and remove old email of user first
upgrade script to cleanup email:uid, email:sorted, will remove entries if user doesn't exist or doesn't have email or if entry in user hash doesn't match entry in email:uid
fix missing ! in email interstitial
fix missing await in canSendValidation,
fix broken tests
dont pass sessionId to email.remove if admin is changing/removing email
2 years ago
Julian Lam fecdab8b6f refactor: `helpers.loginUser` to be fully async 2 years ago
Julian Lam 9c576a0758
Email confirmation QOL updates (#10987)
* breaking: remove `SocketUser.emailConfirm`, re: #10954

* chore: move email confirmation related configs to own section in Settings > Email

* feat: new user email method `getValidationExpiry`, returns expiration in ms.. probably.

* fix: bug where `user.email.isValidationPending` returned an u nexpected non-boolean value if there was no confirmation pending (only when checking email as well)

* fix: update getValidationExpiry to return ms

* test: use emailConfirmInterval for tests, for now

* fix: throw friendly error when attempting an email change within email confirmation window

* feat: new config option `emailConfirmExpiry` in days, governs how long the confirm link is good for

* test: additional tests for user email methods

* fix: add back missing handling of  option

* test: fix tests
2 years ago
Julian Lam aa8914a153 feat: v3 user email tests 3 years ago